DryIoc
DryIoc copied to clipboard
Feature Request: add global .WithDefaultServiceTypeCondition(Func<Type, bool> condition) method
Given the global Rules support within DryIoc, I would like to see an option to add a default serviceTypeCondition for all of my RegisterMany calls.
var container = new Container(Rules.Default
.WithDefaultServiceTypeCondition(type => type.IsInterface))
The default behavior can still be ImTools Fun.Always when this method isn't overridden, but this would give us the ability to apply the same configuration across the entire application without the explicit need to call it on every registration.
@ChaseFlorell Thanks for suggestion.
I think we need more RegisterMany targeted thingy,
e.g. WithRegisterManyRules(serviceTypeConditon: t => t.IsInterface).
So we keep the door open to extend it later.