/// <summary> /// Called by the WCF to create the binding element /// </summary> /// <returns></returns> protected override BindingElement CreateBindingElement() { FluorineLegacyMessageEncodingBindingElement bindingElement = new FluorineLegacyMessageEncodingBindingElement(); this.ApplyConfiguration(bindingElement); return(bindingElement); }
/* * //The only property we need to configure for our binding element is the type of * //inner encoder to use. Here, we support text and binary. * [ConfigurationProperty("innerMessageEncoding", DefaultValue = "textMessageEncoding")] * public string InnerMessageEncoding * { * get { return (string)base["innerMessageEncoding"]; } * set { base["innerMessageEncoding"] = value; } * } */ //Called by the WCF to apply the configuration settings (the property above) to the binding element public override void ApplyConfiguration(BindingElement bindingElement) { FluorineLegacyMessageEncodingBindingElement binding = (FluorineLegacyMessageEncodingBindingElement)bindingElement; PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; /* * if (propertyInfo["innerMessageEncoding"].ValueOrigin != PropertyValueOrigin.Default) * { * switch ((string)base["innerMessageEncoding"]) * { * case "textMessageEncoding": * //binding.InnerMessageEncodingBindingElement = new TextMessageEncodingBindingElement(); * throw new ConfigurationErrorsException("An inner message encoder must not be specificied"); * case "binaryMessageEncoding": * //binding.InnerMessageEncodingBindingElement = new BinaryMessageEncodingBindingElement(); * throw new ConfigurationErrorsException("An inner message encoder must not be specificied"); * } * } */ }
/// <summary> /// Called by the WCF to create the binding element /// </summary> /// <returns></returns> protected override BindingElement CreateBindingElement() { FluorineLegacyMessageEncodingBindingElement bindingElement = new FluorineLegacyMessageEncodingBindingElement(); this.ApplyConfiguration(bindingElement); return bindingElement; }