WSHttpBindingBase.IBindingRuntimePreferences.ReceiveSynchronously Właściwość

Definicja

Pobiera wartość wskazującą, czy żądania przychodzące są obsługiwane synchronicznie lub asynchronicznie.

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

Wartość właściwości

Boolean

true jeśli żądania są obsługiwane synchronicznie; false w przypadku obsługi asynchronicznej. Wartość domyślna to false, aby obsługiwać żądania asynchronicznie.

Implementuje

Przykłady

W tym przykładzie pokazano, jak używać elementu członkowskiego ReceiveSynchronously.

static void SnippetReceiveSynchronously ()
{
    WSHttpBinding binding = new WSHttpBinding();
    IBindingRuntimePreferences s  =
                       binding.GetProperty<IBindingRuntimePreferences>
                       (new BindingParameterCollection());
    bool receiveSynchronously = s.ReceiveSynchronously;
}
Private Shared Sub SnippetReceiveSynchronously()
    Dim binding As New WSHttpBinding()
    Dim s As IBindingRuntimePreferences = binding.GetProperty(Of IBindingRuntimePreferences) (New BindingParameterCollection())
        Dim receiveSynchronously = s.ReceiveSynchronously

End Sub

Dotyczy