AgentMulder icon indicating copy to clipboard operation
AgentMulder copied to clipboard

Not Recognising IoC Injected Types At All

Open jamsoft opened this issue 9 years ago • 5 comments

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

jamsoft avatar Jun 22 '15 21:06 jamsoft

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

khellang avatar Jun 23 '15 07:06 khellang

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

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

hmemcpy avatar Jun 23 '15 07:06 hmemcpy

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 avatar Jun 23 '15 23:06 jamsoft

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 avatar Jul 04 '15 17:07 jamsoft

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

jamsoft avatar Mar 09 '16 20:03 jamsoft