:
container.Register(
AllTypes.FromThisAssembly().Pick()
.WithService.DefaultInterface())
.ConfigureFor<IBar>(c =>
c.If((k, m) => m.Implementation == typeof(SecondBar)));
SecondBar impl IBar. , , , , .
:
public static BasedOnDescriptor Select<TService, TImpl>(this BasedOnDescriptor desc)
{
return desc.ConfigureFor<TService>(c => c.If((k, m) => m.Implementation == typeof(TImpl)));
}
public static BasedOnDescriptor Ignore<TService>(this BasedOnDescriptor desc)
{
return desc.ConfigureFor<TService>(c => c.If((k, m) => false));
}
:
container.Register(
AllTypes.FromThisAssembly().Pick()
.WithService.DefaultInterface())
.Select<IBar, SecondBar>()
.Ignore<ISomeService>()
. , . @Krzysztof Koźmic: ?:)