Class MultiplexedCancellationTokenSource
Provides extension methods for IMultiplexedCancellationTokenSource
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public static class MultiplexedCancellationTokenSource
Methods
View SourceCausedByTimeout(OperationCanceledException, Scope)
Determines whether the operation was canceled by the specified source due to timeout.
Declaration
public static bool CausedByTimeout(this OperationCanceledException e, CancellationTokenMultiplexer.Scope scope)
Parameters
| Type | Name | Description |
|---|---|---|
| OperationCanceledException | e | The exception to analyze. |
| CancellationTokenMultiplexer.Scope | scope | The linked token source. |
Returns
| Type | Description |
|---|---|
| bool | true indicates that the |
CausedByTimeout(OperationCanceledException, ScopeWithTimeout)
Determines whether the operation was canceled by the specified source due to timeout.
Declaration
public static bool CausedByTimeout(this OperationCanceledException e, CancellationTokenMultiplexer.ScopeWithTimeout scope)
Parameters
| Type | Name | Description |
|---|---|---|
| OperationCanceledException | e | The exception to analyze. |
| CancellationTokenMultiplexer.ScopeWithTimeout | scope | The linked token source. |
Returns
| Type | Description |
|---|---|
| bool | true indicates that the |
CausedBy<TSource>(OperationCanceledException, TSource, CancellationToken)
Determines whether the operation was canceled by the specified source.
Declaration
public static bool CausedBy<TSource>(this OperationCanceledException e, TSource source, CancellationToken token) where TSource : struct, IMultiplexedCancellationTokenSource
Parameters
| Type | Name | Description |
|---|---|---|
| OperationCanceledException | e | The exception to analyze. |
| TSource | source | The linked token source. |
| CancellationToken | token | The token to check |
Returns
| Type | Description |
|---|---|
| bool | true indicates that the cancellation caused by |
Type Parameters
| Name | Description |
|---|---|
| TSource |