System.Threading.Tasks.Extensions by Microsoft

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

 ValueTask

public struct ValueTask : IEquatable<ValueTask>
Provides an awaitable result of an asynchronous operation.
public bool IsCanceled { get; }

Gets whether the ValueTask represents a canceled operation.

public bool IsCompleted { get; }

Gets whether the ValueTask represents a completed operation.

public bool IsCompletedSuccessfully { get; }

Gets whether the ValueTask represents a successfully completed operation.

public bool IsFaulted { get; }

Gets whether the ValueTask represents a failed operation.

public ValueTask(Task task)

Initialize the ValueTask with a Task that represents the operation.

public ValueTask(IValueTaskSource source, short token)

Initialize the ValueTask with a IValueTaskSource object that represents the operation.

public static bool op_Equality(ValueTask left, ValueTask right)

Returns a value indicating whether two ValueTask values are equal.

public static bool op_Inequality(ValueTask left, ValueTask right)

Returns a value indicating whether two ValueTask values are not equal.

public Task AsTask()

Gets a Task object to represent this ValueTask.

public ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)

Configures an awaiter for this ValueTask.

public bool Equals(ValueTask other)

Returns a value indicating whether this value is equal to a specified ValueTask value.

Gets an awaiter for this ValueTask.

Gets a ValueTask that may be used at any point in the future.