The current signature of IVariantFeatureManager.GetVariantAsync is
ValueTask<Variant> GetVariantAsync(string feature, TargetingContext context, CancellationToken cancellationToken = default);
It accepts the parameter of type TargetingContext.
For contextual feature filter:
public interface IContextualFeatureFilter<TContext> : IFeatureFilterMetadata
{
Task<bool> EvaluateAsync(FeatureFilterEvaluationContext featureFilterContext, TContext appContext);
}
They can use any type of context for evaluation. When calling GetVariantAsync, the contextual feature filter which requires context of types othen than TargetingContext is unuseable.
We need to change the GetVariantAsync to accept parameter of ITargetingContext.