Share via


ContextualTargetingFilter.EvaluateAsync Method

Definition

Performs a targeting evaluation using the provided TargetingContext to determine if a feature should be enabled.

public System.Threading.Tasks.Task<bool> EvaluateAsync (Microsoft.FeatureManagement.FeatureFilterEvaluationContext context, Microsoft.FeatureManagement.FeatureFilters.ITargetingContext targetingContext);
abstract member EvaluateAsync : Microsoft.FeatureManagement.FeatureFilterEvaluationContext * Microsoft.FeatureManagement.FeatureFilters.ITargetingContext -> System.Threading.Tasks.Task<bool>
override this.EvaluateAsync : Microsoft.FeatureManagement.FeatureFilterEvaluationContext * Microsoft.FeatureManagement.FeatureFilters.ITargetingContext -> System.Threading.Tasks.Task<bool>
Public Function EvaluateAsync (context As FeatureFilterEvaluationContext, targetingContext As ITargetingContext) As Task(Of Boolean)

Parameters

context
FeatureFilterEvaluationContext

The feature evaluation context.

targetingContext
ITargetingContext

The targeting context to use during targeting evaluation.

Returns

True if the feature is enabled, false otherwise.

Implements

Exceptions

Thrown if either context or targetingContext is null.

Applies to