Skip to content

Instantly share code, notes, and snippets.

@kasunkv
Created January 19, 2020 18:51
Show Gist options
  • Save kasunkv/38dfa09845556a7214230c45e8cbd0db to your computer and use it in GitHub Desktop.
Save kasunkv/38dfa09845556a7214230c45e8cbd0db to your computer and use it in GitHub Desktop.
Registering the IDisabledFeatureHandler implementation
namespace MusicStore.Web
{
public class Startup
{
...
public void ConfigureServices(IServiceCollection services)
{
...
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
// Configure Feature Management
services
.AddFeatureManagement()
.AddFeatureFilter<BrowserFilter>()
.UseDisabledFeaturesHandler(new MusicStoreDisabledFeaturesHandler());
...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment