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);
        }
 BinaryMessageEncodingBindingElement(BinaryMessageEncodingBindingElement elementToBeCloned)
     : base(elementToBeCloned)
 {
     maxReadPoolSize  = elementToBeCloned.maxReadPoolSize;
     maxWritePoolSize = elementToBeCloned.maxWritePoolSize;
     readerQuotas     = new XmlDictionaryReaderQuotas();
     elementToBeCloned.readerQuotas.CopyTo(readerQuotas);
     MaxSessionSize         = elementToBeCloned.MaxSessionSize;
     BinaryVersion          = elementToBeCloned.BinaryVersion;
     messageVersion         = elementToBeCloned.messageVersion;
     CompressionFormat      = elementToBeCloned.CompressionFormat;
     maxReceivedMessageSize = elementToBeCloned.maxReceivedMessageSize;
 }