System.Threading.CancellationToken: Method Members

The methods of System.Threading.CancellationToken are listed below. For a list of all members, see the CancellationToken Members list.

See Also: Inherited members from System.ValueType

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.