hmemcpy / AgentMulder

** THIS PLUGIN IS NO LONGER MAINTAINED. PLEASE FOLLOW ERNICOMMUNITY FOR UPDATES **
https://github.com/ERNICommunity/AgentMulder
MIT License
151 stars 33 forks source link

Not Recognising IoC Injected Types At All #77

Open jamsoft opened 9 years ago

jamsoft commented 9 years ago

I've just installed 0.7.3.0 into R# 9.1.1 Ultimate 2015.1.1

I have a Unity application that I'm working on and ReSharper is still telling me that types are not instantiated.

Consider this code, this class and the registration code are in the same project within Visual Studio 2012:

PageManager.cs public class PageManager : IPageManager { ... }

PageManagerModule.cs _container.RegisterType<IPageManager, PageManager>(new ContainerControlledLifetimeManager());

ReShaper is still underlining the PageManager class name and telling me:

"Class PageManager is never instantiated"

My Unity reference is "Microsoft.Practices.Unity" and I'm using version 2.1.505.0

khellang commented 9 years ago

I can't see you're registering either PageManager or IPageManager from that code? :confused:

hmemcpy commented 9 years ago

Hmm, maybe github ate the &lt; and &gt; from the generic method...

Was it something like _container.RegisterType<IPageManager, PageManager>(new ...)?

jamsoft commented 9 years ago

Oh damn yes, GitHub ate the code. I know it works it's been in the codebase for 6 years! :)

Yes the code is exactly _container.RegisterType<IPageManager, PageManager>(new ContainerControlledLifetimeManager());

jamsoft commented 9 years ago

Is there any ETA on this issue? Pretty much everything I do these days is in some way Mvvm or IoC. Would be good to have an idea of when this might be fixed.

Thanks.

jamsoft commented 8 years ago

Any news on this as I had to give up on this plugin ... shame.