共用方式為


IGrainBase.OnDeactivateAsync(DeactivationReason, CancellationToken) 方法

定義

由粒紋實作覆寫的方法,以處理停用。

public virtual System.Threading.Tasks.Task OnDeactivateAsync (Orleans.DeactivationReason reason, System.Threading.CancellationToken token);
abstract member OnDeactivateAsync : Orleans.DeactivationReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnDeactivateAsync : Orleans.DeactivationReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function OnDeactivateAsync (reason As DeactivationReason, token As CancellationToken) As Task

參數

reason
DeactivationReason

停用的原因。

token
CancellationToken

用來表示停用應該立即完成的解除標記。

傳回

Task 表示作業。

適用於