Skip to content

Instantly share code, notes, and snippets.

@kasunkv
Created January 19, 2020 06:00
Show Gist options
  • Save kasunkv/d751c4c1a26dae484e8881e44270522c to your computer and use it in GitHub Desktop.
Save kasunkv/d751c4c1a26dae484e8881e44270522c to your computer and use it in GitHub Desktop.
Registering Percentage Filter in ConfigureServices()
using Microsoft.FeatureManagement;
using Microsoft.FeatureManagement.FeatureFilters;
namespace MusicStore.Web
{
public class Startup
{
...
public void ConfigureServices(IServiceCollection services)
{
...
// Configure Feature Management
services
.AddFeatureManagement()
.AddFeatureFilter<PercentageFilter>(); // register PercentageFilter
...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment