共用方式為


BatchWorkerFromDelegate 建構函式

定義

多載

BatchWorkerFromDelegate(Func<Task>)
BatchWorkerFromDelegate(Func<Task>, CancellationToken)

初始化新的 BatchWorkerFromDelegate 執行個體。

BatchWorkerFromDelegate(Func<Task>)

public BatchWorkerFromDelegate (Func<System.Threading.Tasks.Task> work);
new Orleans.BatchWorkerFromDelegate : Func<System.Threading.Tasks.Task> -> Orleans.BatchWorkerFromDelegate
Public Sub New (work As Func(Of Task))

參數

work
Func<Task>

適用於

BatchWorkerFromDelegate(Func<Task>, CancellationToken)

來源:
BatchWorker.cs

初始化新的 BatchWorkerFromDelegate 執行個體。

public BatchWorkerFromDelegate (Func<System.Threading.Tasks.Task> work, System.Threading.CancellationToken cancellationToken = default);
new Orleans.BatchWorkerFromDelegate : Func<System.Threading.Tasks.Task> * System.Threading.CancellationToken -> Orleans.BatchWorkerFromDelegate
Public Sub New (work As Func(Of Task), Optional cancellationToken As CancellationToken = Nothing)

參數

work
Func<Task>

叫用時要叫用的 Work() 委派。

cancellationToken
CancellationToken

用來停止背景工作角色的解除標記。

適用於