File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/Microsoft.FeatureManagement Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ public TimeWindowFilter(ILoggerFactory loggerFactory = null)
3737 public IMemoryCache Cache { get ; set ; }
3838
3939 /// <summary>
40- /// This property allows the time window filter in our test suite to use simulated time .
40+ /// This property allows the time window filter to use custom <see cref="TimeProvider"/> .
4141 /// </summary>
42- internal TimeProvider SystemClock { get ; set ; }
42+ public TimeProvider SystemClock { get ; set ; }
4343
4444 /// <summary>
4545 /// Binds configuration representing filter parameters to <see cref="TimeWindowFilterSettings"/>.
Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ private static IFeatureManagementBuilder GetFeatureManagementBuilder(IServiceCol
175175 builder . AddFeatureFilter < TimeWindowFilter > ( sp =>
176176 new TimeWindowFilter ( )
177177 {
178- Cache = sp . GetRequiredService < IMemoryCache > ( )
178+ Cache = sp . GetRequiredService < IMemoryCache > ( ) ,
179+ SystemClock = sp . GetService < TimeProvider > ( ) ?? TimeProvider . System ,
179180 } ) ;
180181
181182 builder . AddFeatureFilter < ContextualTargetingFilter > ( ) ;
You can’t perform that action at this time.
0 commit comments