Struct Cancellable<T>
A lightweight object with a generic value and a CancellationToken instance.
public readonly struct Cancellable<T>
Type Parameters
TValue's type.
- Inherited Members
- Extension Methods
Constructors
Cancellable(T, CancellationToken)
Creates a Cancellable<T> instance.
public Cancellable(T value, CancellationToken token)
Parameters
valueTValue to assign.
tokenCancellationTokenCancellationToken to assign.
Properties
Token
Assigned CancellationToken.
public CancellationToken Token { get; }
Property Value
Value
Assigned value.
public T Value { get; }
Property Value
- T
Methods
ToString()
Returns a string representation of this Cancellable<T> instance.
[Pure]
public override string ToString()
Returns
- string
String representation.