protected override BindingElement CreateBindingElement() { CustomTextMessageBindingElement binding = new CustomTextMessageBindingElement(); this.ApplyConfiguration(binding); return(binding); }
public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); CustomTextMessageBindingElement binding = (CustomTextMessageBindingElement)bindingElement; binding.MessageVersion = this.MessageVersion; binding.MediaType = this.MediaType; binding.Encoding = this.Encoding; this.ApplyConfiguration(binding.ReaderQuotas); }
CustomTextMessageBindingElement(CustomTextMessageBindingElement binding) : this(binding.Encoding, binding.MediaType, binding.MessageVersion) { this.readerQuotas = new XmlDictionaryReaderQuotas(); binding.ReaderQuotas.CopyTo(this.readerQuotas); }