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(); }
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()); }