NativeActivity<TResult>.CanInduceIdle 屬性

定義

取得或設定值,這個值指出此活動是否會造成工作流程變為閒置。

C#
protected virtual bool CanInduceIdle { get; }

屬性值

如果活動會導致工作流程變為閒置,則為 true,否則為 false。 這個值預設為 false

範例

下列程式碼範例將示範如何在繼承自 NativeActivity<TResult> 的類別中使用 CanInduceIdle。

C#
// indicate to the runtime that this activity can go idle
protected override bool CanInduceIdle
{
    get { return true; }
}

適用於

產品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1