Created
January 19, 2020 18:51
-
-
Save kasunkv/38dfa09845556a7214230c45e8cbd0db to your computer and use it in GitHub Desktop.
Registering the IDisabledFeatureHandler 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) | |
{ | |
... | |
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