File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/Microsoft.FeatureManagement/FeatureFilters Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ public Task<bool> EvaluateAsync(FeatureFilterEvaluationContext context)
69
69
// Check if prebound settings available, otherwise bind from parameters.
70
70
TimeWindowFilterSettings settings = ( TimeWindowFilterSettings ) context . Settings ?? ( TimeWindowFilterSettings ) BindParameters ( context . Parameters ) ;
71
71
72
+ //
73
+ // If prebound settings is not available, which means BindParameters method is not called, we need to validate the feature filter settings.
74
+ if ( context . Settings == null && ! RecurrenceValidator . TryValidateSettings ( settings , out string paramName , out string reason ) )
75
+ {
76
+ throw new ArgumentException ( reason , paramName ) ;
77
+ }
78
+
72
79
DateTimeOffset now = SystemClock ? . UtcNow ?? DateTimeOffset . UtcNow ;
73
80
74
81
if ( ! settings . Start . HasValue && ! settings . End . HasValue )
You can’t perform that action at this time.
0 commit comments