NOW FeatureFlag Extensions is a set of extensions to support feature switching
What if you want to alter, or re-write a (part) of a service, factory, or any other class, that is registered in your application via (Microsoft) Dependency Injection. But, you want to use feature switches/toggles, without having to alter existing code in the class, and without having to restart the running application in order to test the experimental/new code? This question produced this (experimental) project and it's additional libraries.
NOW.FeatureFlagExtensions/src/FeatureTestApplication/Program.cs
Lines 115 to 128 in dffd71a
Branch | Status |
---|---|
master |
Package Name | .NET 7 | |
---|---|---|
Dependency Injection | ||
Main | ||
FeatureManagement | Preview | |
Interceptors | Preview | |
Core | ||
DependencyInjection | Preview | |
Managers | Preview | |
Models | Preview | |
Microsoft FeatureManagement | ||
FeatureManagement | Preview | |
FeatureManagement.Swagger | Preview |
Clone the repository and run the included FeatureTestApplication, the default start-page will be the swagger documentation page, where you can play around with the registered test-features in combination with Api Versioning.
Additionally, you can visit /allservices
, to display all service registrations. This endpoint
uses the package Ardalis.ListStartupServices.
A set of packages to enable "hot-reload" feature switching via Dependency Injection and some other, additional, extensions.
-
NOW.FeatureFlagExtensions.DependencyInjection.FeatureManagement
Enables "hot-reload" feature switching via Dependency Injection. This specific version depends on Microsoft FeatureManagement. read more...- Depends on:
NOW.FeatureFlagExtensions.DependencyInjection
Uses standard Dependency Injection features to enable switching, currently supportsAddScoped
andAddTransient
extensions (noSingleton
at this point). read more...- Depends on:
NOW.FeatureFlagExtensions.DependencyInjection.Managers
Contains the abstract classFeatureFlagManager
, if you want to enable switching via a feature switching/toggle library of your choice. Inherit this class and make it work! read more...NOW.FeatureFlagExtensions.DependencyInjection.Models
Contains the models used by the core libraries. read more...
- Depends on:
- Depends on:
-
NOW.FeatureFlagExtensions.DependencyInjection.Interceptors
An alternative/addition for theNOW.FeatureFlagExtensions.DependencyInjection
extensions. You can use this one, the other one, or use them both depending on your use case. This package will add the extensionsAddInterceptedScoped
,AddInterceptedSingleton
andAddInterceptedTransient
. The extensions depend on the Castle.Core interceptors to do the heavy lifting. read more...- Depends on:
NOW.FeatureFlagExtensions.DependencyInjection.Managers
Contains the abstract classFeatureFlagManager
, if you want to enable switching via a feature switching/toggle library of your choice. Inherit this class and make it work! read more...NOW.FeatureFlagExtensions.DependencyInjection.Models
Contains the models used by the core libraries. read more...
- Depends on:
Executed using v1.1.0-preview (.net 6).
Vanilla Feature Flag Usage
FeatureFlagExtensions (Default) Usage
FeatureFlagExtensions Interceptors Usage
A set of extensions and additional filters, that build on the out-of-the-box Microsoft FeatureManagement configuration.
-
NOW.FeatureFlagExtensions.FeatureManagement
Add additional configurable filters like theAggregateFeatureFilter
,ClaimsFeatureFilter
,EnvironementsFeatureFilter
andRequestHeadersFeatureFilter
. read more... -
NOW.FeatureFlagExtensions.FeatureManagement.Swagger
Adds aFeatureFilterHeaderParameter
for swagger, to enable easy feature switching via dropdown(s), that is (are) populated with all available feature switches. read more...
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the Code of Conduct.