Skip to content

Commit c2a3544

Browse files
authored
Fix CancellationTokenSource.CancelAfter(TimeSpan delay) ArgumentException documentation (#8036)
1 parent fd49e04 commit c2a3544

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

xml/System.Threading/CancellationTokenSource.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@
259259
]]></format>
260260
</remarks>
261261
<exception cref="T:System.ArgumentOutOfRangeException">
262-
<paramref name="delay" />.<see cref="P:System.TimeSpan.TotalMilliseconds" /> is less than -1 or greater than <see cref="F:System.Int32.MaxValue" />.</exception>
262+
<paramref name="delay" />.<see cref="P:System.TimeSpan.TotalMilliseconds" /> is less than -1 or greater than <see href="https://docs.microsoft.com/dotnet/api/system.int32.maxvalue">Int32.MaxValue</see> (or <see href="https://docs.microsoft.com/dotnet/api/system.uint32.maxvalue">UInt32.MaxValue</see> - 1 on some versions of .NET). Note that this upper bound is more restrictive than <see href="https://docs.microsoft.com/dotnet/api/system.timespan.maxvalue">TimeSpan.MaxValue</see>.
263+
</exception>
263264
</Docs>
264265
</Member>
265266
<MemberGroup MemberName="Cancel">
@@ -515,16 +516,16 @@
515516
<summary>Schedules a cancel operation on this <see cref="T:System.Threading.CancellationTokenSource" /> after the specified time span.</summary>
516517
<remarks>
517518
<format type="text/markdown"><![CDATA[
518-
The countdown for the delay starts during this call. When the delay expires,
519-
this <xref:System.Threading.CancellationTokenSource> is canceled, if it has
520-
not been canceled already.
521-
522-
Subsequent calls to `CancelAfter` will reset the delay for this <xref:System.Threading.CancellationTokenSource>, if it has not been canceled already.
519+
## Remarks
520+
The countdown for the delay starts during this call. When the delay expires, this <xref:System.Threading.CancellationTokenSource> is canceled, if it has not been canceled already.
523521
522+
Subsequent calls to `CancelAfter` will reset the delay for this <xref:System.Threading.CancellationTokenSource>, if it has not been canceled already.
524523
]]></format>
525524
</remarks>
526525
<exception cref="T:System.ObjectDisposedException">The exception thrown when this <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
527-
<exception cref="T:System.ArgumentOutOfRangeException">The exception that is thrown when <paramref name="delay" /> is less than -1 or greater than Int32.MaxValue.</exception>
526+
<exception cref="T:System.ArgumentOutOfRangeException">
527+
<paramref name="delay" />.<see cref="P:System.TimeSpan.TotalMilliseconds" /> is less than -1 or greater than <see href="https://docs.microsoft.com/dotnet/api/system.int32.maxvalue">Int32.MaxValue</see> (or <see href="https://docs.microsoft.com/dotnet/api/system.uint32.maxvalue">UInt32.MaxValue</see> - 1 on some versions of .NET). Note that this upper bound is more restrictive than <see href="https://docs.microsoft.com/dotnet/api/system.timespan.maxvalue">TimeSpan.MaxValue</see>.
528+
</exception>
528529
</Docs>
529530
</Member>
530531
<MemberGroup MemberName="CreateLinkedTokenSource">

0 commit comments

Comments
 (0)