AsyncValueTaskMethodBuilder AsyncValueTaskMethodBuilder AsyncValueTaskMethodBuilder AsyncValueTaskMethodBuilder Struct

定義

表示非同步方法產生器,會傳回 ValueTaskRepresents a builder for asynchronous methods that return a ValueTask.

public value class AsyncValueTaskMethodBuilder
public struct AsyncValueTaskMethodBuilder
type AsyncValueTaskMethodBuilder = struct
Public Structure AsyncValueTaskMethodBuilder
繼承
AsyncValueTaskMethodBuilderAsyncValueTaskMethodBuilderAsyncValueTaskMethodBuilderAsyncValueTaskMethodBuilder

屬性

Task Task Task Task

取得此產生器的工作。Gets the task for this builder.

方法

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

排程狀態機器以在指定的 awaiter 完成時繼續下一個動作。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)

排程狀態機器以在指定的 awaiter 完成時繼續下一個動作。Schedules the state machine to proceed to the next action when the specified awaiter completes.

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

建立 AsyncValueTaskMethodBuilder 結構的執行個體。Creates an instance of the AsyncValueTaskMethodBuilder struct.

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

將工作標示為失敗,並將指定的例外狀況繫結至工作。Marks the task as failed and binds the specified exception to the task.

SetResult() SetResult() SetResult() SetResult()

將工作標記為已成功完成。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.

適用於