Show / Hide Table of Contents

Class MultiplexedCancellationTokenSource

Provides extension methods for IMultiplexedCancellationTokenSource

Inheritance
object
MultiplexedCancellationTokenSource
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public static class MultiplexedCancellationTokenSource

Methods

View Source

CausedByTimeout(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 e is triggered by the timeout associated with scope; otherwise, false.

View Source

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 e is triggered by the timeout associated with scope; otherwise, false.

View Source

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 source and CancellationOrigin is token.

Type Parameters
Name Description
TSource
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾