Unity IOC in DynamicNodeProviderBase

Jul 5, 2011 at 6:06 PM

Is there some reason that my Unity container is not able to resolve my dependencies inside the DynamicNodeProviderBase class? I have the following property defined in the DynamicNodeProviderBase class implementation:

[Dependency]
public IMajorMatcherService DomainService { get; set; }

This is the same method that I am using for resolving dependencies in the rest of the system, however, this property never gets resolved.

Thanks in advance!

Coordinator
Jul 6, 2011 at 10:52 AM

DynamicNodeProviderBase etc. are not resolved through Unity / other IoC container. It's best to use the DependencyResolver.Current.GetService<>() to get your dependencies resolved in a DynamicNodeProviderBase implementation.

Jul 6, 2011 at 3:26 PM

Thanks for the tip! I'll try that today.