Exemplo n.º 1
0
        /// <summary>
        /// CreateBindingElement method override
        /// </summary>
        protected override BindingElement CreateBindingElement()
        {
            ReplayMessageEncodingBindingElement bindingElement = new ReplayMessageEncodingBindingElement();

            this.ApplyConfiguration(bindingElement);
            return(bindingElement);
        }
Exemplo n.º 2
0
        /// <summary>
        /// ApplyConfiguration method override
        /// </summary>
        public override void ApplyConfiguration(BindingElement bindingElement)
        {
            ReplayMessageEncodingBindingElement binding      = (ReplayMessageEncodingBindingElement)bindingElement;
            PropertyInformationCollection       propertyInfo = this.ElementInformation.Properties;

            if (propertyInfo["innerMessageEncoding"].ValueOrigin != PropertyValueOrigin.Default)
            {
                switch (this.InnerMessageEncoding)
                {
                case "textMessageEncoding":
                    binding.InnerMessageEncodingBindingElement = new TextMessageEncodingBindingElement();
                    break;

                case "binaryMessageEncoding":
                    binding.InnerMessageEncodingBindingElement = new BinaryMessageEncodingBindingElement();
                    break;
                }
            }
        }