CompatibleCancellationToken Class

Represents a compatible implementation of the ICancellationToken interface that inter-operates with the CancellationToken and can be used to cancel an asynchronous operation.

Definition

Namespace: Gemstone.Threading.Cancellation
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.166 -- Release Build+d3cb24a90fe44346300dfbb17444d7b350f42d79
public class CompatibleCancellationToken : ICancellationToken
Inheritance
Object    CompatibleCancellationToken
Implements
ICancellationToken

Constructors

CompatibleCancellationToken(CancellationToken) Creates a CompatibleCancellationToken based on an existing GSF cancellation token.
CompatibleCancellationToken(CancellationToken) Creates a CompatibleCancellationToken based on an existing system cancellation token.
CompatibleCancellationToken(CancellationTokenSource) Creates a CompatibleCancellationToken based on an existing system cancellation token source.

Properties

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

Methods

Cancel Cancels the operation.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Handle disposing of locally allocated resources, if any.
(Overrides ObjectFinalize)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetToken Gets a CancellationToken associated with this CompatibleCancellationToken.
GetTokenSource Gets a CancellationTokenSource associated with this CompatibleCancellationToken.
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Operators

(CancellationToken to CompatibleCancellationToken) Implicitly converts existing system cancellation token to a CompatibleCancellationToken.
(CancellationTokenSource to CompatibleCancellationToken) Implicitly converts existing system cancellation token source to a CompatibleCancellationToken.
(CompatibleCancellationToken to CancellationToken) Implicitly converts a CompatibleCancellationToken to an associated CancellationToken.
(CompatibleCancellationToken to CancellationTokenSource) Implicitly converts a CompatibleCancellationToken to an associated CancellationTokenSource.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also