System.Threading.CancellationToken Members

The members of System.Threading.CancellationToken are listed below.

See Also: Inherited members from System.ValueType

Public Constructors

Public Properties

[read-only]
CanBeCanceledbool.

Gets whether this token is capable of being in the canceled state.

[read-only]
IsCancellationRequestedbool.

Gets whether cancellation has been requested for this token.

[read-only]
static
NoneCancellationToken.

Returns an empty CancellationToken value.

[read-only]
WaitHandleWaitHandle.

Gets a System.Threading.WaitHandle that is signaled when the token is canceled.

Public Methods

override
Equals(object) : bool

Determines whether the current System.Threading.CancellationToken instance is equal to the specified object.

Equals(CancellationToken) : bool

Determines whether the current System.Threading.CancellationToken instance is equal to the specified token.

override
GetHashCode() : int

Serves as a hash function for a System.Threading.CancellationToken.

Register(Action) : CancellationTokenRegistration

Registers a delegate that will be called when this System.Threading.CancellationToken is canceled.

Register(Action, bool) : CancellationTokenRegistration

Registers a delegate that will be called when this System.Threading.CancellationToken is canceled.

Register(Action<object>, object) : CancellationTokenRegistration

Registers a delegate that will be called when this System.Threading.CancellationToken is canceled.

Register(Action<object>, object, bool) : CancellationTokenRegistration

Registers a delegate that will be called when this System.Threading.CancellationToken is canceled.

ThrowIfCancellationRequested()

Throws a OperationCanceledException if this token has had cancellation requested.

Public Operators

static
Equality(CancellationToken, CancellationToken)

Determines whether two System.Threading.CancellationToken instances are equal.

static
Inequality(CancellationToken, CancellationToken)

Determines whether two System.Threading.CancellationToken instances are not equal.