Allow collections to be registered conditional, similar to what Container.RegisterConditional does for non-collection registrations.
e.g.:
container.Collection.RegisterConditional(
serviceType: typeof(ILogger),
serviceTypes: new[] { typeof(SqlLogger), typeof(FileLogger) },
c => c.Consumer.Target.Name.StartsWith("realLoggers"));
container.Collection.RegisterConditional(
serviceType: typeof(ILogger),
serviceTypes: new[] { typeof(ConsoleLogger), typeof(NullLogger) },
c => !c.Handled);
The difficulty in this feature is the following:
- It should work for both ambient and flowing scope scenarios
- It should work for all supported collection types
Related to #1009 and #1010.
Allow collections to be registered conditional, similar to what Container.RegisterConditional does for non-collection registrations.
e.g.:
The difficulty in this feature is the following:
Related to #1009 and #1010.