Feature Switch

What's new in FeatureSwitch?

It's been while since last FeatureSwitch library release. Just pushed out a bit of stuff held under the hood. Some of them are requested by my lovely consumers :) Here are enlisted some of the latest version features in the library. 1) EPiServer Site Strategy. Now you can use EPiServer's site strategy to enable or disable feature per particular EPiServer site. With example below feature ThisFeatureIsOnlyForSite1 will only be enabled if request is made against site named "Site1", otherwise - feature will be disabled. [EPiServerSite(Key = "Site1")] public class ThisFeatureIsOnlyForSite1 : BaseFeature…

Keep reading

FeatureSwitch meets Glimpse

FeatureSwitch library got yet another plugin in its family. Glimpse is an amazing framework for troubleshooting and tracing your web application, even in production environment. If by coincidence you are a consumer of this framework and also use FeatureSwitch library, then now they run together. You can access your features through Glimpse control panel. Installation You need to install a package from nuget.org feed: > Install-Package FeatureSwitch.Glimpse Using FeatureSwitch.Glimpse package you can get an overview of your features and its state through FeatureSwitch tab. There is also…

Keep reading

EPiServer DDS Strategy for FeatureSwitch

Thanks to Paul Smith for adding some more EPiServer integration for FeatureSwitch library. Now FeatureSwitch EPiServer integration library is equipped with DDS storage strategy. This was pretty easy to implement: public class EPiServerDatabaseStrategyImpl : BaseStrategyImpl { public override bool Read() { var store = typeof(FeatureState).GetStore(); var definition = store.Items<featurestate>().FirstOrDefault(d => d.Name == Context.Key); return definition != null && definition.Enabled; } public override void Write(bool state) { var store = typeof(FeatureState).GetStore(); var definition = store.Items<featurestate>().FirstOrDefault(d => d.Name == Context.Key) ?? new…

Keep reading

FeatureSwitch library 1.0 – Released!

Have you ever wrote the code like following to verify that either you have to disable or enable some functionality base on set of conditions (usually different sources): if(ConfigurationManager.AppSettings["MyKey"] == "true") { // feature is enabled - do something ...; } else { // feature is disabled - do something ...; } or something like this: if(HttpContext.Current != null && HttpContext.Current.Session != null && HttpContext.Current.Session["MyKey"] == "true") { return ...; } FeatureSwitch library should reduce amount of time and code needed to implement feature toggle in unified way. FeatureSwitch library is easily adoptable…

Keep reading