TaskUtilities..::..AutoCancelingToken Method (TimeSpan)

Automatically cancels a CancellationToken after the indicated amount of time.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


[SuppressMessageAttribute]
public static CancellationToken AutoCancelingToken(
	TimeSpan delay
)
<SuppressMessageAttribute> _
Public Shared Function AutoCancelingToken ( _
	delay As TimeSpan _
) As CancellationToken

Parameters

delay
Type: TimeSpan
The delay before the token is canceled.

Return Value

CancellationToken.

Exceptions


ExceptionCondition
[ArgumentOutOfRangeException]delay