Exemple #1
0
 // <Snippet19>
 static void SnippetReceiveSynchronously()
 {
     WSHttpBinding binding        = new WSHttpBinding();
     IBindingRuntimePreferences s =
         binding.GetProperty <IBindingRuntimePreferences>
             (new BindingParameterCollection());
     bool receiveSynchronously = s.ReceiveSynchronously;
 }
Exemple #2
0
        static void SnippetReceiveSynchronously()
        {
            // <Snippet29>

            BasicHttpBinding           binding = new BasicHttpBinding();
            IBindingRuntimePreferences s       =
                (binding as IBindingRuntimePreferences);
            bool receiveSynchronously = s.ReceiveSynchronously;

            // </Snippet29>
        }
Exemple #3
0
        static void SnippetReceiveSynchronously()
        {
            // <Snippet17>

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

            // </Snippet17>
        }
            public void ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
            {
                IBindingRuntimePreferences runtimePreferences = serviceEndpoint.Binding as IBindingRuntimePreferences;

                if (runtimePreferences != null)
                {
                    // it is ok to go up to the ChannelDispatcher here, since
                    // all endpoints that share a ChannelDispatcher also share the same binding
                    endpointDispatcher.ChannelDispatcher.ReceiveSynchronously = runtimePreferences.ReceiveSynchronously;
                }

                endpointDispatcher.ChannelDispatcher.ManualAddressing = this.IsManualAddressing(serviceEndpoint.Binding);
                endpointDispatcher.ChannelDispatcher.EnableFaults     = !this.IsMulticast(serviceEndpoint.Binding);
                endpointDispatcher.ChannelDispatcher.MessageVersion   = serviceEndpoint.Binding.MessageVersion;
            }