jason-roberts / FeatureToggle

Simple, reliable feature toggles in .NET
http://dontcodetired.com/blog/?tag=/featuretoggle
Apache License 2.0
689 stars 111 forks source link

Allow overriding the way providers resolve toggle key names. #165

Open Bunabun opened 5 years ago

Bunabun commented 5 years ago

It'd be nice if AppSettingsProvider, BooleanSqlServerProvider, ect. allowed modifying how it determines the key for a feature toggle. Right now it uses the class name and there are situations where being bound to the class name is inconvenient (friendly names or enum based feature toggle). The logic can be placed in a protected virtual method or a function could be passed into the constructor. I suggest using a virtual method to keep the constructor simple as the providers don't necessarily depend on the function.