共用方式為


NetNamedPipeBinding.IBindingRuntimePreferences.ReceiveSynchronously 屬性

定義

取得值,這個值會指出要以同步或非同步方式處理傳入要求。

property bool System::ServiceModel::Channels::IBindingRuntimePreferences::ReceiveSynchronously { bool get(); };
bool System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously { get; }
member this.System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously : bool
 ReadOnly Property ReceiveSynchronously As Boolean Implements IBindingRuntimePreferences.ReceiveSynchronously

屬性值

false 表示傳入要求以非同步處理。

實作

範例

下列範例會示範部分組態檔,其中包含值設為預設值之 NetNamedPipeBinding 的區段。


NetNamedPipeBinding binding = new NetNamedPipeBinding();
IBindingRuntimePreferences s  =
       binding.GetProperty<IBindingRuntimePreferences>
       (new BindingParameterCollection());
bool receiveSynchronously = s.ReceiveSynchronously;

適用於