-
Notifications
You must be signed in to change notification settings - Fork 119
Support recurrence for TimeWindowFilter #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
92e8a08
improvement & target on main branch
zhiyuanliang-ms a732a24
remove duplicated null check
zhiyuanliang-ms 290e96c
remove redundant if
zhiyuanliang-ms 0e3e1e4
improvement
zhiyuanliang-ms 353c025
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms 3cdcc56
resolve comments
zhiyuanliang-ms 9600e7a
fix typo
zhiyuanliang-ms 64904ec
update
zhiyuanliang-ms 7bd2844
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms bf2e2eb
use enum
zhiyuanliang-ms 3041b06
Update testcases
zhiyuanliang-ms ba89364
fix bug
zhiyuanliang-ms 1403934
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms d8c1790
update
zhiyuanliang-ms e2b3d84
update the logic of FindWeeklyPreviousOccurrence
zhiyuanliang-ms e2fccc2
fix bug
zhiyuanliang-ms 25ff14f
add comments
zhiyuanliang-ms bee8718
update
zhiyuanliang-ms ce5dfae
fix bug & add testcases
zhiyuanliang-ms 724292b
update
zhiyuanliang-ms a3b8fa4
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms 63c7343
update comment
zhiyuanliang-ms d78d844
test
zhiyuanliang-ms 2136562
update comments
zhiyuanliang-ms c0ab54c
Merge branch 'zhiyuanliang/recurring-time-window' of https://github.c…
zhiyuanliang-ms ab9961c
update
zhiyuanliang-ms 252b5c3
update
zhiyuanliang-ms 9fc5bcc
add testcase
zhiyuanliang-ms b9f5ab2
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms 29efb5d
remove monthly/yearly recurrence pattern
zhiyuanliang-ms 421ec48
do not mention monthly and yearly pattern
zhiyuanliang-ms 4eca45d
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms e78a0f6
add more comments
zhiyuanliang-ms b7eb586
update the algorithm to find weekly previous occurrence
zhiyuanliang-ms c653198
update
zhiyuanliang-ms f9537d4
fix typo
zhiyuanliang-ms 9c7ec7d
update
zhiyuanliang-ms 2187121
rename variable
zhiyuanliang-ms fd098f1
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms 934784c
cache added & do validation for only once
zhiyuanliang-ms 77b24b1
add comments
zhiyuanliang-ms f1eefe9
add more testcases
zhiyuanliang-ms 0645a25
add more test
zhiyuanliang-ms acdc16b
not include the end of a time window
zhiyuanliang-ms ace075c
move recurrence validation to RecurrenceValidator
zhiyuanliang-ms 096d136
resolve conflicts
zhiyuanliang-ms 856e183
README updated
zhiyuanliang-ms b1c06ad
update readme
zhiyuanliang-ms 0bb8017
update CalculateSurroundingOccurrences method
zhiyuanliang-ms b5b37f0
add CalculateClosestStart method
zhiyuanliang-ms 4fa9002
testcase updated
zhiyuanliang-ms 6196e21
update
zhiyuanliang-ms 188ce44
use ISystemClock for testing & add limit on time window duration
zhiyuanliang-ms cd94d26
add testcase for timezone
zhiyuanliang-ms 6abaa0d
update
zhiyuanliang-ms 341f78f
update comments
zhiyuanliang-ms ac8f8f4
Merge branch 'main' into zhiyuanliang/recurring-time-window
zhiyuanliang-ms 39149c6
Merge branch 'main' of https://github.com/microsoft/FeatureManagement…
zhiyuanliang-ms 1a04153
change method type
zhiyuanliang-ms 8e9f893
remove unused reference
zhiyuanliang-ms 7deda05
rename variable
zhiyuanliang-ms bf992ff
remove used reference
zhiyuanliang-ms e1616a6
remove empty lines
zhiyuanliang-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
| // | ||
|
|
||
| using System; | ||
|
|
||
| namespace Microsoft.FeatureManagement.FeatureFilters | ||
| { | ||
| /// <summary> | ||
| /// Abstracts the system clock to facilitate testing. | ||
| /// .NET8 offers an abstract class TimeProvider. After we stop supporting .NET version less than .NET8, this ISystemClock should retire. | ||
| /// </summary> | ||
| internal interface ISystemClock | ||
| { | ||
| /// <summary> | ||
| /// Retrieves the current system time in UTC. | ||
| /// </summary> | ||
| public DateTimeOffset UtcNow { get; } | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/Recurrence.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
| // | ||
| namespace Microsoft.FeatureManagement.FeatureFilters | ||
| { | ||
| /// <summary> | ||
| /// A recurrence definition describing how time window recurs | ||
| /// </summary> | ||
| public class Recurrence | ||
| { | ||
| /// <summary> | ||
| /// The recurrence pattern specifying how often the time window repeats | ||
| /// </summary> | ||
| public RecurrencePattern Pattern { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The recurrence range specifying how long the recurrence pattern repeats | ||
| /// </summary> | ||
| public RecurrenceRange Range { get; set; } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.