コード例 #1
0
        public override BindingElementCollection CreateBindingElements()
        {
            BindingElementCollection elements = base.CreateBindingElements();

            BindingElementCollection customElements = new BindingElementCollection();
            foreach (BindingElement element in elements)
            {
                BindingElement customElement = element;
                if (element is MessageEncodingBindingElement)
                {
                    MessageEncodingBindingElement encodingElement = (MessageEncodingBindingElement)element;

                    customElement = new CompressionMessageEncodingBindingElement(encodingElement);
                }

                customElements.Add(customElement);
            }

            return customElements.Clone();
        }
コード例 #2
0
        public override BindingElementCollection CreateBindingElements()
        {
            BindingElementCollection elements = base.CreateBindingElements();

            BindingElementCollection customElements = new BindingElementCollection();

            foreach (BindingElement element in elements)
            {
                BindingElement customElement = element;
                if (element is MessageEncodingBindingElement)
                {
                    MessageEncodingBindingElement encodingElement = (MessageEncodingBindingElement)element;

                    customElement = new CompressionMessageEncodingBindingElement(encodingElement);
                }

                customElements.Add(customElement);
            }

            return(customElements.Clone());
        }