Open smolchanovsky opened 2 years ago
I really don't sure that is a good opportunity.
First of all how many times do you re-use options? I think we can just create override AddNClient with options default parameter or extension method WithOptions (if it isn't exist)
Secondly, string const make me sad every time I've see this. Pure refactoring ability is breaking.
And last but not least... The "name" can be used for any different connections. So... How you suggest resolve the situation when we want to apply same options by name but for multiple clients?
A named client will allow you to use named options when creating via DI: