Unity IOC in DynamicNodeProviderBase

Jul 5, 2011 at 5: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:

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!

Jul 6, 2011 at 9: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 2:26 PM

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