You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceEvaluator.cs
+18-14Lines changed: 18 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ static class RecurrenceEvaluator
16
16
/// <summary>
17
17
/// Checks if a provided timestamp is within any recurring time window specified by the Recurrence section in the time window filter settings.
18
18
/// If the time window filter has an invalid recurrence setting, an exception will be thrown.
19
-
/// <param name="time">A timestamp.</param>
19
+
/// <param name="time">A datetime.</param>
20
20
/// <param name="settings">The settings of time window filter.</param>
21
21
/// <returns>True if the timestamp is within any recurring time window, false otherwise.</returns>
22
22
/// </summary>
@@ -42,8 +42,8 @@ public static bool IsMatch(DateTimeOffset time, TimeWindowFilterSettings setting
42
42
}
43
43
44
44
/// <summary>
45
-
/// Calculate the start time of the closest active time window.
46
-
/// <param name="time">A timestamp.</param>
45
+
/// Calculates the start time of the closest active time window.
46
+
/// <param name="time">A datetime.</param>
47
47
/// <param name="settings">The settings of time window filter.</param>
48
48
/// <returns>The start time of the closest active time window or null if the recurrence range surpasses its end.</returns>
49
49
/// </summary>
@@ -76,8 +76,8 @@ public static bool IsMatch(DateTimeOffset time, TimeWindowFilterSettings setting
76
76
}
77
77
78
78
/// <summary>
79
-
/// Calculate the closest previous recurrence occurrence (if any) before the provided timestamp and the next occurrence (if any) after the provided timestamp.
80
-
/// <param name="time">A timestamp.</param>
79
+
/// Calculates the closest previous recurrence occurrence (if any) before the given time and the next occurrence (if any) after it.
80
+
/// <param name="time">A datetime.</param>
81
81
/// <param name="settings">The settings of time window filter.</param>
82
82
/// <param name="prevOccurrence">The closest previous occurrence. Note that prev occurrence can be null even if the time is past the start date, because the recurrence range may have surpassed its end.</param>
83
83
/// <param name="nextOccurrence">The next occurrence. Note that next occurrence can be null even if the prev occurrence is not null, because the recurrence range may have reached its end.</param>
@@ -139,8 +139,10 @@ private static void CalculateSurroundingOccurrences(DateTimeOffset time, TimeWin
139
139
140
140
141
141
/// <summary>
142
-
/// Try to find the closest previous recurrence occurrence before the provided timestamp according to the recurrence pattern. The given time should be later than the recurrence start.
143
-
/// <param name="time">A timestamp.</param>
142
+
/// Finds the closest previous recurrence occurrence before the given time according to the recurrence pattern.
143
+
/// The given time should be later than the recurrence start.
144
+
/// A return value indicates whether any previous occurrence can be found.
145
+
/// <param name="time">A datetime.</param>
144
146
/// <param name="settings">The settings of time window filter.</param>
/// <param name="numberOfOccurrences">The number of occurrences between the time and the recurrence start.</param>
@@ -182,8 +184,9 @@ private static bool TryFindPreviousOccurrence(DateTimeOffset time, TimeWindowFil
182
184
}
183
185
184
186
/// <summary>
185
-
/// Find the closest previous recurrence occurrence before the provided timestamp according to the "Daily" recurrence pattern. The given time should be later than the recurrence start.
186
-
/// <param name="time">A timestamp.</param>
187
+
/// Finds the closest previous recurrence occurrence before the given time according to the "Daily" recurrence pattern.
188
+
/// The given time should be later than the recurrence start.
189
+
/// <param name="time">A datetime.</param>
187
190
/// <param name="settings">The settings of time window filter.</param>
/// <param name="numberOfOccurrences">The number of occurrences between the time and the recurrence start.</param>
@@ -210,8 +213,9 @@ private static void FindDailyPreviousOccurrence(DateTimeOffset time, TimeWindowF
210
213
}
211
214
212
215
/// <summary>
213
-
/// Find the closest previous recurrence occurrence before the provided timestamp according to the "Weekly" recurrence pattern. The given time should be later than the recurrence start.
214
-
/// <param name="time">A timestamp.</param>
216
+
/// Finds the closest previous recurrence occurrence before the given time according to the "Weekly" recurrence pattern.
217
+
/// The given time should be later than the recurrence start.
218
+
/// <param name="time">A datetime.</param>
215
219
/// <param name="settings">The settings of time window filter.</param>
0 commit comments