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)

Source:
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

用于停止辅助角色的取消令牌。

适用于