protected override bool IsMatch(BindingElement b)
        {
            if (!base.IsMatch(b))
            {
                return(false);
            }
            MtomMessageEncodingBindingElement mtom = b as MtomMessageEncodingBindingElement;

            if (mtom == null)
            {
                return(false);
            }
            if (_maxReadPoolSize != mtom.MaxReadPoolSize)
            {
                return(false);
            }
            if (_maxWritePoolSize != mtom.MaxWritePoolSize)
            {
                return(false);
            }

            // compare XmlDictionaryReaderQuotas
            if (_readerQuotas.MaxStringContentLength != mtom.ReaderQuotas.MaxStringContentLength)
            {
                return(false);
            }
            if (_readerQuotas.MaxArrayLength != mtom.ReaderQuotas.MaxArrayLength)
            {
                return(false);
            }
            if (_readerQuotas.MaxBytesPerRead != mtom.ReaderQuotas.MaxBytesPerRead)
            {
                return(false);
            }
            if (_readerQuotas.MaxDepth != mtom.ReaderQuotas.MaxDepth)
            {
                return(false);
            }
            if (_readerQuotas.MaxNameTableCharCount != mtom.ReaderQuotas.MaxNameTableCharCount)
            {
                return(false);
            }

            if (_maxBufferSize != mtom.MaxBufferSize)
            {
                return(false);
            }

            if (WriteEncoding.EncodingName != mtom.WriteEncoding.EncodingName)
            {
                return(false);
            }
            if (!MessageVersion.IsMatch(mtom.MessageVersion))
            {
                return(false);
            }

            return(true);
        }
        protected override bool IsMatch(BindingElement b)
        {
            if (!base.IsMatch(b))
            {
                return(false);
            }

            if (!(b is ConnectionOrientedTransportBindingElement connection))
            {
                return(false);
            }

            if (_connectionBufferSize != connection._connectionBufferSize)
            {
                return(false);
            }

            if (_hostNameComparisonMode != connection._hostNameComparisonMode)
            {
                return(false);
            }

            if (InheritBaseAddressSettings != connection.InheritBaseAddressSettings)
            {
                return(false);
            }

            if (_channelInitializationTimeout != connection._channelInitializationTimeout)
            {
                return(false);
            }
            if (_maxBufferSize != connection._maxBufferSize)
            {
                return(false);
            }

            if (_maxPendingConnections != connection._maxPendingConnections)
            {
                return(false);
            }

            if (_maxOutputDelay != connection._maxOutputDelay)
            {
                return(false);
            }

            if (_maxPendingAccepts != connection._maxPendingAccepts)
            {
                return(false);
            }

            if (_transferMode != connection._transferMode)
            {
                return(false);
            }

            return(true);
        }
示例#3
0
        BindingElement RemoveNextElement()
        {
            BindingElement element = _remainingBindingElements.Remove <BindingElement>();

            if (element != null)
            {
                return(element);
            }
            throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(
                                                                                                        SR.NoChannelBuilderAvailable, _binding.Name, _binding.Namespace)));
        }
示例#4
0
        protected override bool IsMatch(BindingElement b)
        {
            MessageEncodingBindingElement encoding = b as MessageEncodingBindingElement;

            if (encoding == null)
            {
                return(false);
            }

            return(true);
        }
        protected override bool IsMatch(BindingElement b)
        {
            if (!base.IsMatch(b))
            {
                return(false);
            }

            BinaryMessageEncodingBindingElement binary = b as BinaryMessageEncodingBindingElement;

            if (binary == null)
            {
                return(false);
            }
            if (maxReadPoolSize != binary.MaxReadPoolSize)
            {
                return(false);
            }
            if (maxWritePoolSize != binary.MaxWritePoolSize)
            {
                return(false);
            }

            // compare XmlDictionaryReaderQuotas
            if (readerQuotas.MaxStringContentLength != binary.ReaderQuotas.MaxStringContentLength)
            {
                return(false);
            }
            if (readerQuotas.MaxArrayLength != binary.ReaderQuotas.MaxArrayLength)
            {
                return(false);
            }
            if (readerQuotas.MaxBytesPerRead != binary.ReaderQuotas.MaxBytesPerRead)
            {
                return(false);
            }
            if (readerQuotas.MaxDepth != binary.ReaderQuotas.MaxDepth)
            {
                return(false);
            }
            if (readerQuotas.MaxNameTableCharCount != binary.ReaderQuotas.MaxNameTableCharCount)
            {
                return(false);
            }

            if (MaxSessionSize != binary.MaxSessionSize)
            {
                return(false);
            }
            if (CompressionFormat != binary.CompressionFormat)
            {
                return(false);
            }
            return(true);
        }
示例#6
0
        protected override bool IsMatch(BindingElement b)
        {
            if (!base.IsMatch(b))
            {
                return(false);
            }

            ConnectionOrientedTransportBindingElement connection = b as ConnectionOrientedTransportBindingElement;

            if (connection == null)
            {
                return(false);
            }

            if (connectionBufferSize != connection.connectionBufferSize)
            {
                return(false);
            }
            if (hostNameComparisonMode != connection.hostNameComparisonMode)
            {
                return(false);
            }
            if (inheritBaseAddressSettings != connection.inheritBaseAddressSettings)
            {
                return(false);
            }
            if (channelInitializationTimeout != connection.channelInitializationTimeout)
            {
                return(false);
            }
            if (maxBufferSize != connection.maxBufferSize)
            {
                return(false);
            }
            if (maxPendingConnections != connection.maxPendingConnections)
            {
                return(false);
            }
            if (maxOutputDelay != connection.maxOutputDelay)
            {
                return(false);
            }
            if (maxPendingAccepts != connection.maxPendingAccepts)
            {
                return(false);
            }
            if (transferMode != connection.transferMode)
            {
                return(false);
            }

            return(true);
        }
示例#7
0
        protected override bool IsMatch(BindingElement b)
        {
            if (b == null)
            {
                return(false);
            }
            if (!(b is SslStreamSecurityBindingElement ssl))
            {
                return(false);
            }

            return(RequireClientCertificate == ssl.RequireClientCertificate && _sslProtocols == ssl._sslProtocols);
        }
示例#8
0
        protected override bool IsMatch(BindingElement b)
        {
            if (b == null)
            {
                return(false);
            }
            SslStreamSecurityBindingElement ssl = b as SslStreamSecurityBindingElement;

            if (ssl == null)
            {
                return(false);
            }

            return(requireClientCertificate == ssl.requireClientCertificate && sslProtocols == ssl.sslProtocols);
        }
示例#9
0
 protected override bool IsMatch(BindingElement b)
 {
     if (b == null)
     {
         return(false);
     }
     if (!(b is TransportBindingElement transport))
     {
         return(false);
     }
     if (_maxBufferPoolSize != transport.MaxBufferPoolSize)
     {
         return(false);
     }
     if (_maxReceivedMessageSize != transport.MaxReceivedMessageSize)
     {
         return(false);
     }
     return(true);
 }
示例#10
0
 //TODO: Move back to internal
 protected virtual bool IsMatch(BindingElement b)
 {
     Fx.Assert(true, "Should not be called unless this binding element is used in one of the standard bindings. In which case, please re-implement the IsMatch() method.");
     return(false);
 }
示例#11
0
#pragma warning disable RECS0154 // Parameter is never used
        protected BindingElement(BindingElement elementToBeCloned)
        {
        }