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

Consider exposing AppSettingsProvider config in non-Core versions #146

Open jason-roberts opened 7 years ago

jason-roberts commented 7 years ago

Originally from this thread from @djjlewis: #121

"Hi @jason-roberts I've just started looking at using your library in out web application. It is written on ASP.NET Core, but we are currently targetting the full framework (net461) due to a couple of 3rd party libraries that do not currently support netcore / netstandard. While trying to follow your asp.net core sample project, I noticed I did not have access to the Configuration property of the AppSettingsProvider, and a quick glance at the source looks like this is being removed due to a preprocessor directive.

I must say I haven't had time to look into this in too much detail, so apologies if I have missed something fundamental, but ordinarily, all the NETCORE parts should in theory work on the full framework, whereas the other way around may not be true (NETFULL may not work on NETCORE).

From what I can see, I think the reasoning is that you are implicitly choosing how the config is read depending on which framework is being targetted, whereas I think it would be nice if one could choose to use the asp.net core Configuration support regardless of the framework being targetted?

If you agree, and if I get chance I will see if I can have a look myself and send a PR, but am just a bit up against it time-wise atm as I am sure many of us are!"

jason-roberts commented 7 years ago

Thanks for suggesting this @djjlewis - let me look into it and we can see if we want to move forward with this in v4 release, thanks :)