Class CancellationTokenExtension
Provides a set of helper method to play around with cancellation tokens.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
public static class CancellationTokenExtension
Methods
AsTask(CancellationToken)
Converts the CancellationToken to a Task that cancels when the CancellationToken is being canceled.
Declaration
public static Task AsTask(this CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |