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)
6969 // Check if prebound settings available, otherwise bind from parameters.
7070 TimeWindowFilterSettings settings = ( TimeWindowFilterSettings ) context . Settings ?? ( TimeWindowFilterSettings ) BindParameters ( context . Parameters ) ;
7171
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+
7279 DateTimeOffset now = SystemClock ? . UtcNow ?? DateTimeOffset . UtcNow ;
7380
7481 if ( ! settings . Start . HasValue && ! settings . End . HasValue )
You can’t perform that action at this time.
0 commit comments