{"id":23051374,"url":"https://github.com/valdisiljuconoks/featureswitch","last_synced_at":"2025-06-15T04:34:44.872Z","repository":{"id":12612926,"uuid":"15284007","full_name":"valdisiljuconoks/FeatureSwitch","owner":"valdisiljuconoks","description":"FeatureSwitch is library that should reduce amount of time and code required to implement feature switching in your projects.","archived":false,"fork":false,"pushed_at":"2024-01-18T15:40:49.000Z","size":82748,"stargazers_count":57,"open_issues_count":87,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T01:16:13.921Z","etag":null,"topics":["episerver","feature-switches","feature-toggle","features","featureswitch-library","net-mvc","toggles","web-optimization"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valdisiljuconoks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://paypal.me/valdisiljuconoks"}},"created_at":"2013-12-18T13:36:14.000Z","updated_at":"2024-10-07T08:30:46.000Z","dependencies_parsed_at":"2024-06-18T17:13:17.136Z","dependency_job_id":null,"html_url":"https://github.com/valdisiljuconoks/FeatureSwitch","commit_stats":{"total_commits":106,"total_committers":6,"mean_commits":"17.666666666666668","dds":0.2547169811320755,"last_synced_commit":"1d32074392eefda83ef9877410694168fd57327b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2FFeatureSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2FFeatureSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2FFeatureSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2FFeatureSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valdisiljuconoks","download_url":"https://codeload.github.com/valdisiljuconoks/FeatureSwitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["episerver","feature-switches","feature-toggle","features","featureswitch-library","net-mvc","toggles","web-optimization"],"created_at":"2024-12-15T23:45:41.234Z","updated_at":"2025-04-10T01:16:22.714Z","avatar_url":"https://github.com/valdisiljuconoks.png","language":"C#","funding_links":["https://paypal.me/valdisiljuconoks"],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/clard5agcutb7ctc/branch/master?svg=true)](https://ci.appveyor.com/project/ValdisIljuconoks/featureswitch/branch/master)\n\n# Feature Switch\n\n## Supporting FeatureSwitch\n\nIf you find this library useful, cup of coffee would be awesome! You can support further development of the library via [Paypal](https://paypal.me/valdisiljuconoks).\n\n## Feature Toggling Framework for Various Types of Applications\nHave 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):\n\n```csharp\n  if(ConfigurationManager.AppSettings[\"MyKey\"] == \"true\")\n      return ...;\n```\n\nor something like this:\n\n```csharp\n  if(HttpContext.Current != null \u0026\u0026 HttpContext.Current.Session != null \u0026\u0026 HttpContext.Current.Session[\"MyKey\"] == \"true\")\n      return ...;\n```\n\nFeatureSwitch library should reduce amount of time and code needed to implement feature toggle in unified way.\nFeatureSwitch library is easily adoptable and extendable.\n\n## Overview\nFeatureSwitch library is based on two basic aspects [features](https://github.com/valdisiljuconoks/FeatureSwitch/wiki#features) and [strategies](https://github.com/valdisiljuconoks/FeatureSwitch/wiki#strategies). In combination they provide enough input data for feature set builder to construct feature context to be used later to check whether particular feature is enabled or disabled.\nCurrently there are following additional integrations:\n* [Mvc Control Panel](https://github.com/valdisiljuconoks/FeatureSwitch/wiki/Asp.Net-MVC-Integration) - FeatureSwitch UI Control Panel\n* [Web Optimization](https://github.com/valdisiljuconoks/FeatureSwitch/wiki/Web-Optimization-Helpers) - Helpers for styles and scripts conditional bundling and minification\n* [EPiServer integration](https://github.com/valdisiljuconoks/FeatureSwitch/wiki/EPiServer-Integration) - Module to integrate into [EPiServer CMS platform](http://www.episerver.com) for easier access to UI Control Panel\n\n## Features\nFeature is main aspect of FeatureSwitch library it's your logical feature representation - either it's enabled or disabled. You will need to define your features to work with FeatureSwitch library.\nTo define your feature you have to create class that inherits from `FeatureSwitch.BaseFeature` class:\n\n```csharp\n  public class MySampleFeature : FeatureSwitch.BaseFeature\n  {\n  }\n```\n\nKeep in mind that you will need to add at least one [strategy](https://github.com/valdisiljuconoks/FeatureSwitch/wiki#strategies) for the feature in order to enable it.\nBy default every feature is **disabled**.\n\n\n## Setup (FeatureSet builder)\nTo get started with FeatureSwitch you need to kick-off [FeatureSetBuilder](https://github.com/valdisiljuconoks/FeatureSwitch/blob/master/FeatureSwitch/FeatureSetBuilder.cs) by calling `Build()` instance method:\n\n```\n  var builder = new FeatureSetBuilder();\n  builder.Build();\n```\n\nBy calling `Build` method you are triggering auto-discovery of features in current application domain loaded assemblies. Auto-discovery will look for classes inheriting from `FeatureSwitch.BaseFeature` class. Those are assumed to be features.\n\n## Is Feature Enabled?\nAfter features have been discovered and set has been built you are able to check whether feature is enabled or not:\n\n```\n  var isEnabled = FeatureContext.IsEnabled\u003cMySampleFeature\u003e();\n```\n\nYou can also use some of the `IsEnabled` overloads for other usages.\n\n## Where do I get packages?\nAll packages are available on NuGet feeds:\n* [Core library](https://www.nuget.org/packages/FeatureSwitch/)\n* [Asp.Net Mvc Integration](https://www.nuget.org/packages/FeatureSwitch.AspNet.Mvc/)\n* [Asp.Net Mvc 5 Integration / Owin](https://www.nuget.org/packages/FeatureSwitch.AspNet.Mvc5/)\n* [Web Optimization pack](https://www.nuget.org/packages/FeatureSwitch.Web.Optimization/)\n* [EPiServer integration](http://nuget.episerver.com/en/OtherPages/Package/?packageId=FeatureSwitch.EPiServer)\n\n## More Information\n[More information](https://github.com/valdisiljuconoks/FeatureSwitch/wiki/Extending-FeatureSwitch-library) on extending FeatureSwitch library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaldisiljuconoks%2Ffeatureswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaldisiljuconoks%2Ffeatureswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaldisiljuconoks%2Ffeatureswitch/lists"}