Skip to content

Commit 55dc0fe

Browse files
committed
fix: generated docs could not reference types only available in .NET 8
1 parent 7e509f2 commit 55dc0fe

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

docs/TimeProviderExtensions.AutoAdvanceBehavior.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ specified by [TimerAutoTriggerCount](TimeProviderExtensions.AutoAdvanceBehavior.
2727
the time the callback was scheduled to be invoked, just as it is if [Advance(TimeSpan)](TimeProviderExtensions.ManualTimeProvider.md#TimeProviderExtensions.ManualTimeProvider.Advance(System.TimeSpan) 'TimeProviderExtensions.ManualTimeProvider.Advance(System.TimeSpan)')
2828
or [SetUtcNow(DateTimeOffset)](TimeProviderExtensions.ManualTimeProvider.md#TimeProviderExtensions.ManualTimeProvider.SetUtcNow(System.DateTimeOffset) 'TimeProviderExtensions.ManualTimeProvider.SetUtcNow(System.DateTimeOffset)') was manually called.
2929

30-
Setting this to `1` can be used to ensure all timers, e.g. those used by [Task.Delay(TimeSpan, TimeProvider)](https://docs.microsoft.com/en-us/dotnet/api/Task.Delay#Task_Delay_TimeSpan, TimeProvider_ 'Task.Delay(TimeSpan, TimeProvider)'),
31-
[Task.WaitAsync(TimeSpan, TimeProvider)](https://docs.microsoft.com/en-us/dotnet/api/Task.WaitAsync#Task_WaitAsync_TimeSpan, TimeProvider_ 'Task.WaitAsync(TimeSpan, TimeProvider)'), [System.Threading.CancellationTokenSource.CancelAfter(System.TimeSpan)](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationTokenSource.CancelAfter#System_Threading_CancellationTokenSource_CancelAfter_System_TimeSpan_ 'System.Threading.CancellationTokenSource.CancelAfter(System.TimeSpan)') and others
30+
Setting this to `1` can be used to ensure all timers, e.g. those used by `Task.Delay(TimeSpan, TimeProvider)`,
31+
`Task.WaitAsync(TimeSpan, TimeProvider)`, `CancellationTokenSource.CancelAfter(TimeSpan)` and others
3232
are completed immediately.
3333

34-
Setting this to a number larger than `1`, e.g. `10`, can be used to automatically cause a [PeriodicTimer(TimeSpan, TimeProvider)](https://docs.microsoft.com/en-us/dotnet/api/PeriodicTimer#PeriodicTimer_TimeSpan, TimeProvider_ 'PeriodicTimer(TimeSpan, TimeProvider)')
35-
to automatically have its [System.Threading.PeriodicTimer.WaitForNextTickAsync(System.Threading.CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.PeriodicTimer.WaitForNextTickAsync#System_Threading_PeriodicTimer_WaitForNextTickAsync_System_Threading_CancellationToken_ 'System.Threading.PeriodicTimer.WaitForNextTickAsync(System.Threading.CancellationToken)') async enumerable return `10` times.
34+
Setting this to a number larger than `1`, e.g. `10`, can be used to automatically cause a `PeriodicTimer(TimeSpan, TimeProvider)`
35+
to automatically have its `PeriodicTimer.WaitForNextTickAsync(CancellationToken)` async enumerable return `10` times.
3636

3737
```csharp
3838
public int TimerAutoTriggerCount { get; set; }

src/TimeProviderExtensions/AutoAdvanceBehavior.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public sealed record class AutoAdvanceBehavior
3131
/// <exception cref="ArgumentOutOfRangeException">Thrown when set to a value less than <see cref="TimeSpan.Zero"/>.</exception>
3232
public TimeSpan TimestampAdvanceAmount { get => timestampAdvanceAmount; set { ThrowIfLessThanZero(value); timestampAdvanceAmount = value; } }
3333

34-
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
3534
/// <summary>
3635
/// <para>
3736
/// Gets or sets the amount of times timer callbacks will automatically be triggered.
@@ -43,21 +42,20 @@ public sealed record class AutoAdvanceBehavior
4342
/// or <see cref="ManualTimeProvider.SetUtcNow(DateTimeOffset)"/> was manually called.
4443
/// </para>
4544
/// <para>
46-
/// Setting this to <c>1</c> can be used to ensure all timers, e.g. those used by <see cref="Task.Delay(TimeSpan, TimeProvider)"/>,
47-
/// <see cref="Task.WaitAsync(TimeSpan, TimeProvider)"/>, <see cref="CancellationTokenSource.CancelAfter(TimeSpan)"/> and others
45+
/// Setting this to <c>1</c> can be used to ensure all timers, e.g. those used by <c>Task.Delay(TimeSpan, TimeProvider)</c>,
46+
/// <c>Task.WaitAsync(TimeSpan, TimeProvider)</c>, <c>CancellationTokenSource.CancelAfter(TimeSpan)</c> and others
4847
/// are completed immediately.
4948
/// </para>
5049
/// <para>
51-
/// Setting this to a number larger than <c>1</c>, e.g. <c>10</c>, can be used to automatically cause a <see cref="PeriodicTimer(TimeSpan, TimeProvider)"/>
52-
/// to automatically have its <see cref="PeriodicTimer.WaitForNextTickAsync(CancellationToken)"/> async enumerable return <c>10</c> times.
50+
/// Setting this to a number larger than <c>1</c>, e.g. <c>10</c>, can be used to automatically cause a <c>PeriodicTimer(TimeSpan, TimeProvider)</c>
51+
/// to automatically have its <c>PeriodicTimer.WaitForNextTickAsync(CancellationToken)</c> async enumerable return <c>10</c> times.
5352
/// </para>
5453
/// </summary>
5554
/// <remarks>
5655
/// Set to <c>0</c> to disable auto timer callback invocation. The default value is zero <c>0</c>.
5756
/// </remarks>
5857
/// <exception cref="ArgumentOutOfRangeException">Thrown when set to a value less than zero <c>0</c>.</exception>
5958
public int TimerAutoTriggerCount { get => timerAutoInvokeCount; set { ThrowIfLessThanZero(value); timerAutoInvokeCount = value; } }
60-
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
6159

6260
private static void ThrowIfLessThanZero(TimeSpan value, [CallerMemberName] string? parameterName = null)
6361
{

0 commit comments

Comments
 (0)