Skip to content
Merged
Show file tree
Hide file tree
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 @@ -37,9 +37,9 @@ public TimeWindowFilter(ILoggerFactory loggerFactory = null)
public IMemoryCache Cache { get; set; }

/// <summary>
/// This property allows the time window filter in our test suite to use simulated time.
/// This property allows the time window filter to use custom <see cref="TimeProvider"/>.
/// </summary>
internal TimeProvider SystemClock { get; set; }
public TimeProvider SystemClock { get; set; }

/// <summary>
/// Binds configuration representing filter parameters to <see cref="TimeWindowFilterSettings"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ private static IFeatureManagementBuilder GetFeatureManagementBuilder(IServiceCol
builder.AddFeatureFilter<TimeWindowFilter>(sp =>
new TimeWindowFilter()
{
Cache = sp.GetRequiredService<IMemoryCache>()
Cache = sp.GetRequiredService<IMemoryCache>(),
SystemClock = sp.GetService<TimeProvider>() ?? TimeProvider.System,
});

builder.AddFeatureFilter<ContextualTargetingFilter>();
Expand Down