GSF.Core by Grid Protection Alliance

<PackageReference Include="GSF.Core" Version="2.2.25-beta" />

.NET API 1,096,800 bytes

 CompatibleCancellationToken

Represents a compatible implementation of the ICancellationToken interface that interoperates with the CancellationToken and can be used to cancel an asynchronous operation.
public virtual bool IsCancelled { get; }

Gets a value that indicates whether the operation has been cancelled.

Creates a CompatibleCancellationToken based on an existing system cancellation token source.

Creates a CompatibleCancellationToken based on an existing system cancellation token.

Creates a CompatibleCancellationToken based on an existing GSF cancellation token.

Implicitly converts existing system cancellation token to a CompatibleCancellationToken.

Implicitly converts existing system cancellation token source to a CompatibleCancellationToken.

Implicitly converts a CompatibleCancellationToken to an associated CancellationToken.

Implicitly converts a CompatibleCancellationToken to an associated CancellationTokenSource.

public virtual bool Cancel()

Cancels the operation.

Gets a CancellationToken associated with this CompatibleCancellationToken.

Gets a CancellationTokenSource associated with this CompatibleCancellationToken.