jason-roberts / FeatureToggle

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

Use strongly typed application settings files #113

Open jonswaino opened 8 years ago

jonswaino commented 8 years ago

I noticed you use the AppSettings in the web.config to source the backing values for feature toggles. This seems an old way to get values out of configuration and the disadvantage is that it requires magic strings.

Would it not be better to use the new strongly type settings within the application, perhaps with a default class name e.g. FeatureToggle.Settings?

This creates a baked in strongly type class like so: internal sealed partial class FeatureToggle : global::System.Configuration.ApplicationSettingsBase {}

Internally, the toggle library could use convention/reflection to pick up the class and its properties.