Share via

IContextualFeatureFilter<TContext> Interface


A filter that can be used to determine whether some criteria is met to enable a feature. A feature filter is free to use any criteria available, such as process state or request content. Feature filters can be registered for a given feature and if any feature filter evaluates to true, that feature will be considered enabled. A contextual feature filter can take advantage of contextual data passed in from callers of the feature management system. A contextual feature filter will only be executed if a context that is assignable from TContext is available.

public interface IContextualFeatureFilter<TContext> : Microsoft.FeatureManagement.IFeatureFilterMetadata
type IContextualFeatureFilter<'Context> = interface
    interface IFeatureFilterMetadata
Public Interface IContextualFeatureFilter(Of TContext)
Implements IFeatureFilterMetadata

Type Parameters



EvaluateAsync(FeatureFilterEvaluationContext, TContext)

Evaluates the feature filter to see if the filter's criteria for being enabled has been satisfied.

Applies to