Click or drag to resize

CompatibleCancellationToken Class

Represents a compatible implementation of the ICancellationToken interface that interoperates with the CancellationToken and can be used to cancel an asynchronous operation.
Inheritance Hierarchy
SystemObject
  GSF.ThreadingCompatibleCancellationToken

Namespace: GSF.Threading
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public class CompatibleCancellationToken : ICancellationToken
View Source

The CompatibleCancellationToken type exposes the following members.

Constructors
 NameDescription
Public methodCompatibleCancellationToken(CancellationToken) Creates a CompatibleCancellationToken based on an existing GSF cancellation token.
Public methodCompatibleCancellationToken(CancellationToken) Creates a CompatibleCancellationToken based on an existing system cancellation token.
Public methodCompatibleCancellationToken(CancellationTokenSource) Creates a CompatibleCancellationToken based on an existing system cancellation token source.
Top
Properties
 NameDescription
Public propertyIsCancelled Gets a value that indicates whether the operation has been cancelled.
Top
Methods
 NameDescription
Public methodCancel Cancels the operation.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Handle disposing of locally allocated resources, if any.
(Overrides ObjectFinalize)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetToken Gets a CancellationToken associated with this CompatibleCancellationToken.
Public methodGetTokenSource Gets a CancellationTokenSource associated with this CompatibleCancellationToken.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Operators
 NameDescription
Public operatorStatic member(CancellationToken to CompatibleCancellationToken) Implicitly converts existing system cancellation token to a CompatibleCancellationToken.
Public operatorStatic member(CancellationTokenSource to CompatibleCancellationToken) Implicitly converts existing system cancellation token source to a CompatibleCancellationToken.
Public operatorStatic member(CompatibleCancellationToken to CancellationToken) Implicitly converts a CompatibleCancellationToken to an associated CancellationToken.
Public operatorStatic member(CompatibleCancellationToken to CancellationTokenSource) Implicitly converts a CompatibleCancellationToken to an associated CancellationTokenSource.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also