Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public Task<bool> EvaluateAsync(FeatureFilterEvaluationContext context, ITargeti
// Check if prebound settings available, otherwise bind from parameters.
TargetingFilterSettings settings = (TargetingFilterSettings)context.Settings ?? (TargetingFilterSettings)BindParameters(context.Parameters);

//
// If prebound settings is not available, which means BindParameters method is not called, we need to validate the feature filter settings.
if (context.Settings == null && !TargetingEvaluator.TryValidateSettings(settings, out string paramName, out string reason))
{
throw new ArgumentException(reason, paramName);
}

return Task.FromResult(TargetingEvaluator.IsTargeted(targetingContext, settings, _options.IgnoreCase, context.FeatureName));
}
}
Expand Down