Skip to content

CoreServiceCollectionExtensions.AddFeatureToggles method

Adds the IFeatureToggles service to the registry.

public static IServiceCollection AddFeatureToggles(this IServiceCollection services, 
    IConfiguration? configuration = null, object[]? disableByDefault = null, 
    Dictionary<string, List<RequiresFeatureAttribute>>? dependencyMap = null)
parameter description
services The services.
configuration Configuration source.
disableByDefault Features to disable by default, pass ["*"] to disable all features by default.
dependencyMap Feature dependency map. Features are dictionary keys and the list of features that they depend on (e.g. all must be enabled) for that feature to be enabled.

See Also