public WseTcpChannelListener(WseTcpTransportBindingElement bindingElement, BindingContext context)
            : base(context.Binding)
        {
            // populate members from binding element
            int maxBufferSize = (int)bindingElement.MaxReceivedMessageSize;

            this.bufferManager = BufferManager.CreateBufferManager(bindingElement.MaxBufferPoolSize, maxBufferSize);

            Collection <MessageEncodingBindingElement> messageEncoderBindingElements
                = context.BindingParameters.FindAll <MessageEncodingBindingElement>();

            if (messageEncoderBindingElements.Count > 1)
            {
                throw new InvalidOperationException("More than one MessageEncodingBindingElement was found in the BindingParameters of the BindingContext");
            }
            else if (messageEncoderBindingElements.Count == 1)
            {
                this.encoderFactory = messageEncoderBindingElements[0].CreateMessageEncoderFactory();
            }
            else
            {
                this.encoderFactory = new MtomMessageEncodingBindingElement().CreateMessageEncoderFactory();
            }

            // TODO, kennyw, context.ListenUriMode
            this.uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
        }
 protected WseTcpTransportBindingElement(WseTcpTransportBindingElement other)
     : base(other)
 {
 }