AsyncValueTaskMethodBuilder<TResult> AsyncValueTaskMethodBuilder<TResult> AsyncValueTaskMethodBuilder<TResult> AsyncValueTaskMethodBuilder<TResult> Struct

Definition

Represents a builder for asynchronous methods that returns a ValueTask<TResult>.

generic <typename TResult>
public value class AsyncValueTaskMethodBuilder
public struct AsyncValueTaskMethodBuilder<TResult>
type AsyncValueTaskMethodBuilder<'Result> = struct
Public Structure AsyncValueTaskMethodBuilder(Of TResult)

Type Parameters

TResult
Inheritance
AsyncValueTaskMethodBuilder<TResult>AsyncValueTaskMethodBuilder<TResult>AsyncValueTaskMethodBuilder<TResult>AsyncValueTaskMethodBuilder<TResult>

Properties

Task Task Task Task

Gets the task for this builder.

Methods

AwaitOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine)

Schedules the state machine to proceed to the next action when the specified awaiter completes.

AwaitUnsafeOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitUnsafeOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitUnsafeOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine) AwaitUnsafeOnCompleted<TAwaiter,TStateMachine>(TAwaiter, TStateMachine)

Schedules the state machine to proceed to the next action when the specified awaiter completes.

Create() Create() Create() Create()

Creates an instance of the AsyncValueTaskMethodBuilder<TResult> struct.

SetException(Exception) SetException(Exception) SetException(Exception) SetException(Exception)

Marks the task as failed and binds the specified exception to the task.

SetResult(TResult) SetResult(TResult) SetResult(TResult) SetResult(TResult)

Marks the task as successfully completed.

SetStateMachine(IAsyncStateMachine) SetStateMachine(IAsyncStateMachine) SetStateMachine(IAsyncStateMachine) SetStateMachine(IAsyncStateMachine)

Associates the builder with the specified state machine.

Start<TStateMachine>(TStateMachine) Start<TStateMachine>(TStateMachine) Start<TStateMachine>(TStateMachine) Start<TStateMachine>(TStateMachine)

Begins running the builder with the associated state machine.

Applies to