Closed jclifford closed 12 years ago
Oh wow! My first real bug! Thank you very much for the report!
I figured out what's wrong! Since Agent Mulder works by matching patterns via ReSharper SSR, I used the abstract class Ninject.Syntax.BindingRoot
as the base class for the search expression. I did this because this class is common to both StandardKernel
and a Ninject Module - they both derive from this class.
However you have moved your registrations to another method which only took IKernel
- IKernel does not implement the abstract BindingRoot
, but rather the interface IBindingRoot
, and that's why the pattern matching failed.
I will fix this in the next version of Agent Mulder, in the mean time, you can work around this problem by passing BindingRoot
or StandardKernel
as the parameter type to your registerServices
method.
Very cool bug, thanks again!
Hi again, didn't want to keep you waiting, the fix was literally 1 letter change (well, in several places :)) Please get the hotfix here: https://github.com/downloads/hmemcpy/AgentMulder/AgentMulder1.0.3.1.msi
If this works for you, please feel free to close the issue :)
Many thanks for your prompt reply and excellent work!
AgentM 1.0.3.1 fixes the problem :)
Incidentally the use of registerServices(IKernel kernel) is direct from the Nuget package Ninject.MVC3 which adds some MVC specific code for Ninject, so I am sure someone else would have come up with the same problem.
Thanks again for an excellent plugin.
I have a very simple repository test using NinJect, but it appears that AgentM is not working at all. All the "old" ReSharper warnings and error messages are still displayed :(
AgentM: 1.0.3.0, ReSharper: 6.1.1000.82 VS: 10.0.40219.1 NinJect: 4.0.30319 - No other Resharper plug-ins installed.
Am I missing something obvious?
NinJect binding:
Repository and Interface:
Usage: