Created
January 19, 2020 13:44
-
-
Save kasunkv/a961858f5fef172a7c5859fb40a65396 to your computer and use it in GitHub Desktop.
Registering the custom IFeatureFilter implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MusicStore.Web | |
{ | |
public class Startup | |
{ | |
... | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
... | |
// Register the required IHttpContextAccessor | |
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>(); | |
// Configure Feature Management | |
services | |
.AddFeatureManagement() | |
.AddFeatureFilter<BrowserFilter>(); | |
... | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment