WorkflowServiceAttributes.UseSynchronizationContext 属性
定义
获取或设置一个值,该值指定是否使用当前同步上下文来选择执行的线程。Gets or sets a value that specifies whether to use the current synchronization context to choose the thread of execution.
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
属性值
如果对服务的所有调用都必须在 SynchronizationContext 指定的线程上运行,则为 true;否则为 false。true if all calls to the service must run on the thread specified by the SynchronizationContext; otherwise, false.
示例
下面的示例演示如何访问 UseSynchronizationContext 属性。The following example demonstrates how to access the UseSynchronizationContext property.
WorkflowServiceAttributes attributes = new WorkflowServiceAttributes();
attributes.UseSynchronizationContext = false;
Dim attributes As New WorkflowServiceAttributes()
attributes.UseSynchronizationContext = False
注解
默认值是 true。The default value is true.