System.Threading.Tasks.Extensions by Microsoft

<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />

 ValueTask<TResult>

public struct ValueTask<TResult> : IEquatable<ValueTask<TResult>>
Provides a value type that wraps a sk{TResult} and a TResultTResult, only one of which is used.
public bool IsCanceled { get; }

Gets a value that indicates whether this object represents a canceled operation.

public bool IsCompleted { get; }

Gets a value that indicates whether this object represents a completed operation.

public bool IsCompletedSuccessfully { get; }

Gets a value that indicates whether this object represents a successfully completed operation.

public bool IsFaulted { get; }

Gets a value that indicates whether this object represents a failed operation.

public TResult Result { get; }

Gets the result.

public ValueTask(TResult result)

Initializes a new instance of the lueTask{TResult} class using the supplied result of a successful operation.

public ValueTask(Task<TResult> task)

Initializes a new instance of the lueTask{TResult} class using the supplied task that represents the operation.

public ValueTask(IValueTaskSource<TResult> source, short token)

public static bool op_Equality(ValueTask<TResult> left, ValueTask<TResult> right)

Compares two values for equality.

public static bool op_Inequality(ValueTask<TResult> left, ValueTask<TResult> right)

Determines whether two lueTask{TResult} values are unequal.

public Task<TResult> AsTask()

Retrieves a sk{TResult} object that represents this lueTask{TResult}.

public ConfiguredValueTaskAwaitable<TResult> ConfigureAwait(bool continueOnCapturedContext)

Configures an awaiter for this value.

public bool Equals(ValueTask<TResult> other)

Determines whether the specified lueTask{TResult} object is equal to the current lueTask{TResult} object.

public ValueTaskAwaiter<TResult> GetAwaiter()

Creates an awaiter for this value.

public ValueTask<TResult> Preserve()