Show / Hide Table of Contents

Struct CancellationTokenHandle

Exposes CancellationToken to the unmanaged code.

Implements
IDisposable
IEquatable<CancellationTokenHandle>
Inherited Members
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Runtime.InteropServices
Assembly: DotNext.Threading.dll
Syntax
public struct CancellationTokenHandle : IDisposable, IEquatable<CancellationTokenHandle>

Constructors

View Source

CancellationTokenHandle(CancellationToken)

Initializes a new handle for the specified cancellation token.

Declaration
public CancellationTokenHandle(CancellationToken token)
Parameters
Type Name Description
CancellationToken token

The token to wrap.

Properties

View Source

Token

Unwraps the token.

Declaration
public readonly CancellationToken Token { get; }
Property Value
Type Description
CancellationToken

Methods

View Source

Dispose()

Releases memory associated with the handle.

Declaration
public void Dispose()
View Source

Equals(CancellationTokenHandle)

Declaration
public readonly bool Equals(CancellationTokenHandle other)
Parameters
Type Name Description
CancellationTokenHandle other
Returns
Type Description
bool
View Source

Equals(object)

Declaration
public override readonly bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
View Source

GetHashCode()

Declaration
public override readonly int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

ToString()

Declaration
public override readonly string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

View Source

operator ==(CancellationTokenHandle, CancellationTokenHandle)

Declaration
public static bool operator ==(CancellationTokenHandle left, CancellationTokenHandle right)
Parameters
Type Name Description
CancellationTokenHandle left
CancellationTokenHandle right
Returns
Type Description
bool
View Source

operator !=(CancellationTokenHandle, CancellationTokenHandle)

Declaration
public static bool operator !=(CancellationTokenHandle left, CancellationTokenHandle right)
Parameters
Type Name Description
CancellationTokenHandle left
CancellationTokenHandle right
Returns
Type Description
bool

Implements

IDisposable
IEquatable<T>

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)

See Also

UnmanagedCallersOnlyAttribute
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾