BackgroundTaskDoWorkAsync Method

工作方法。

Definition

Namespace: QuickAdmin.Service.Background
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.13
C#
protected abstract Task<IServiceResult> DoWorkAsync(
	CancellationToken stoppingToken
)

Parameters

stoppingToken  CancellationToken
指示停止的令牌。

Return Value

TaskIServiceResult
服务调用结果。
若返回了表示失败的结果,错误消息将记入 LastFailedMessage,且如果 BreakTaskWhenWorkFailed 属性为 true,任务将立即结束。

Remarks

在派生类去实现。

See Also