|
| .NET Framework Class Library |
| CancellationTokenSource..::.CreateLinkedTokenSource Method (array<CancellationToken>[]()[]) |
| CancellationTokenSource Class See Also Send Feedback |
Creates a CancellationTokenSource that will be in the canceled state
when any of the source tokens are in the canceled state.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function CreateLinkedTokenSource ( _ ParamArray tokens As CancellationToken() _ ) As CancellationTokenSource |
| C# |
|---|
public static CancellationTokenSource CreateLinkedTokenSource( params CancellationToken[] tokens ) |
Parameters
- tokens
- Type: array<
System.Threading..::.CancellationToken
>[]()[]
The CancellationToken instances to observe.
Return Value
A CancellationTokenSource that is linked to the source tokens.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | tokens is null. |
| System..::.ObjectDisposedException | A CancellationTokenSource associated with one of the source tokens has been disposed. |