System.Threading.CancellationTokenSource: Method Members

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

See Also: Inherited members from System.Object

Public Methods

Cancel()

Communicates a request for cancellation.

Cancel(bool)

Communicates a request for cancellation, and specifies whether remaining callbacks and cancelable operations should be processed.

CancelAfter(int)

Schedules a cancel operation on this System.Threading.CancellationTokenSource after the specified number of milliseconds.

CancelAfter(TimeSpan)

Schedules a cancel operation on this System.Threading.CancellationTokenSource after the specified time span.

static
CreateLinkedTokenSource(params CancellationToken[]) : CancellationTokenSource

Creates a System.Threading.CancellationTokenSource that will be in the canceled state when any of the source tokens in the specified array are in the canceled state.

static
CreateLinkedTokenSource(CancellationToken, CancellationToken) : CancellationTokenSource

Creates a System.Threading.CancellationTokenSource that will be in the canceled state when any of the source tokens are in the canceled state.

Dispose()

Releases all resources used by the current instance of the System.Threading.CancellationTokenSource class.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Threading.CancellationTokenSource class and optionally releases the managed resources.