asp.net mvc 5 - GetService in NinjectDependencyResolver not getting hit -


I am using a custom dependency resolver - Resident Dependency Resolver: Audacity Resolver.

Here is the code:

  using the system; Using System.Collections.Generic; Using System.Web.Mvc; Using EssentialTools.Models; Using Ninject; Namespace EssentialTools.Instructure {Public Class Ninject dependencyResolver: Freedom Resolver {Private IKernel kernel; Public Nondesigned Dependency Resolver (IKernel Kernel Param) {kernel = kernelParam; AddBindings (); } Public Object GetService (type service type) {return kernel.TryGet (serviceType); } Public IEnumerable & lt; Object & gt; GetServices (type service type) {return kernel.GetAll (serviceType); } Private Zero AddBindings () {kernel.Bind & lt; IValueCalculator & gt; (). & Lt; LinqValueCalculator & gt; (); }}}  

I registered a resolver in the webmaster of the resident. And I know that my AddBindings are getting hit because I can set breakpoints and hit and inspect. Or write debug statement in the output window.

But I do not think my GetService is hit, I can not hit the break point and I can not write debug statement in the window.

I have set it before and I am always able to hit the breakpoint in GetServiceType (type serviceType) and

I know that because of its registered addbindings work And if I bind it, then they make errors.

In addition, if I comment GetService out errors that I have not implemented it but are not used even when applied. It seems that it's using the default.

What do I remember in the configuration?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -