-
Notifications
You must be signed in to change notification settings - Fork 67
Add support for named options #7
Comments
Also the
should probably take |
@lodejard If we didn't have a Name property on the IOptionsConfiguration, how would we filter based on Name before applying them? Is the idea that instead that the default OptionsConfiguration class would take the targetName in the constructor and only execute the action if the name matches during setup? |
Yep |
Updated the PR with the change to take names in Setup, can you review? #15 |
We ended up using a property for Name and not having the name argument from the method that applies the Action. This is the simplest design that allows deterministically executing unnamed options before matching named options for the same Order. We are keeping this item open so that we can reconsider this later, e.g. if we still believe that it is compelling to build more flexibility into the name matching logic, we should also consider providing a way to compare two instances of IOptionAction in order to sort them correctly, e.g. we could have IOptionAction implement IComparer and then OrderBy(s => s) should pick it up automatically. |
Add Name/GetNamedOptions to IOptionsSetup/OptionsAccessor
The text was updated successfully, but these errors were encountered: