Exporter (0) Imprimer
Développer tout

CallbackBehaviorAttribute.UseSynchronizationContext Property

Gets or sets a value that specifies whether to use the current synchronization context to choose the thread of execution.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel.Extensions (in System.ServiceModel.Extensions.dll)

public bool UseSynchronizationContext { get; set; }

Property Value

Type: System.Boolean
true if all calls to the service must run on the thread specified by the SynchronizationContext; otherwise, false. The default value is true.

Use this property to provide the user interface thread affinity that some applications require. The default case, in which UseSynchronizationContext is set to true, synchronizes all calls to the service to run on the user interface thread.

Note that the thread used is the current synchronization thread when DuplexChannelFactory<TChannel>.CreateChannel or DuplexClientBase<TChannel>.CreateChannel is called.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft