UnityConfiguration icon indicating copy to clipboard operation
UnityConfiguration copied to clipboard

Resolving multiple implementations with property injection of optional dependencies

Open chs499 opened this issue 12 years ago • 0 comments

Hey there,

I am using Unity 2.1 and UnityConfiguration in order to realize convention-based configuration.

I am using the SetAllPropertiesConvention in order to inject an implementation of ILogger into many of my types.

If i'm resolving a single implementation using for example container.Resolve<IProcessor>() the instance of ILogger is properly injected.

However, if i'm resolving multiple instances of that type using container.ResolveAll<IProcessor>() the property remains null.

If've posted this already on stackoverflow, but got no with no satisfying solution to my problem.

See this: http://stackoverflow.com/questions/16200711/resolving-multiple-implementations-with-property-injection-of-optional-dependenc

Many thanks Chris

chs499 avatar May 21 '13 07:05 chs499