예제 #1
0
        void Initialize()
        {
            httpTransport   = new HttpTransportBindingElement();
            httpsTransport  = new HttpsTransportBindingElement();
            transactionFlow = new TransactionFlowBindingElement();
            textEncoding    = new TextMessageEncodingBindingElement();

            // setting up configurable settings' default values
            this.MaxReceivedMessageSize = long.MaxValue;
            this.SecurityMode           = StreamedSecurityMode.Transport;
            this.TransferMode           = StreamedTransferMode.Streamed;

            // setting up non-configurable settings' default values
            this.FlowTransactions = true;
            transactionFlow.TransactionProtocol = TransactionProtocol.WSAtomicTransactionOctober2004;
        }
예제 #2
0
        protected override void InitializeFrom(Binding binding)
        {
            if (binding == null)
            {
                throw new ArgumentNullException("binding");
            }
            if (binding.GetType() != typeof(WSStreamedHttpBinding))
            {
                throw new ArgumentException();
            }
            WSStreamedHttpBinding wssBinding = (WSStreamedHttpBinding)binding;

            this.HostNameComparisonMode = wssBinding.HostNameComparisonMode;
            this.MaxReceivedMessageSize = wssBinding.MaxReceivedMessageSize;
            this.MaxBufferSize          = wssBinding.MaxBufferSize;
            this.ProxyAddress           = wssBinding.ProxyAddress;
            this.BypassProxyOnLocal     = wssBinding.BypassProxyOnLocal;
            this.UseDefaultWebProxy     = wssBinding.UseDefaultWebProxy;
            this.TransferMode           = wssBinding.TransferMode;
            this.TextEncoding           = wssBinding.TextEncoding;
            this.FlowTransactions       = wssBinding.FlowTransactions;
            this.SecurityMode           = wssBinding.SecurityMode;
        }
        protected override void InitializeFrom(Binding binding)
        {
            if (binding == null)
            {
                throw new ArgumentNullException("binding");
            }
            if (binding.GetType() != typeof(WSStreamedHttpBinding))
            {
                throw new ArgumentException();
            }
            WSStreamedHttpBinding wssBinding = (WSStreamedHttpBinding)binding;

            this.HostNameComparisonMode = wssBinding.HostNameComparisonMode;
            this.MaxReceivedMessageSize = wssBinding.MaxReceivedMessageSize;
            this.MaxBufferSize = wssBinding.MaxBufferSize;
            this.ProxyAddress = wssBinding.ProxyAddress;
            this.BypassProxyOnLocal = wssBinding.BypassProxyOnLocal;
            this.UseDefaultWebProxy = wssBinding.UseDefaultWebProxy;
            this.TransferMode = wssBinding.TransferMode;
            this.TextEncoding = wssBinding.TextEncoding;
            this.FlowTransactions = wssBinding.FlowTransactions;
            this.SecurityMode = wssBinding.SecurityMode;
        }