WorkflowServiceAttributes.UseSynchronizationContext 屬性

定義

取得或設定值,這個值會指定是否使用目前的同步處理內容來選擇執行的執行緒。

public:
 property bool UseSynchronizationContext { bool get(); void set(bool value); };
public bool UseSynchronizationContext { get; set; }
member this.UseSynchronizationContext : bool with get, set
Public Property UseSynchronizationContext As Boolean

屬性值

Boolean

如果所有對服務的呼叫都必須在 SynchronizationContext 指定的執行緒上執行,則為 true,否則為 false

範例

下列範例將示範如何存取 UseSynchronizationContext 屬性。

WorkflowServiceAttributes attributes = new WorkflowServiceAttributes();
attributes.UseSynchronizationContext = false;
Dim attributes As New WorkflowServiceAttributes()
attributes.UseSynchronizationContext = False

備註

預設值是 true

適用於