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

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

            converters = context.BindingParameters.FindAll <IMessageConverter>();

            var 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)
            {
                if (!(messageEncoderBindingElements[0] is ByteStreamMessageEncodingBindingElement))
                {
                    throw new InvalidOperationException("This transport must be used with the ByteStreamMessageEncodingBindingElement.");
                }

                encoderFactory = messageEncoderBindingElements[0].CreateMessageEncoderFactory();
            }
            else
            {
                encoderFactory = new ByteStreamMessageEncodingBindingElement().CreateMessageEncoderFactory();
            }

            uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
        }
 public SolaceRequestChannel(MessageEncoder encoder, BufferManager bufferManager, ChannelManagerBase channelManager, EndpointAddress remoteAddress, Uri via,
                             SolaceEndpointCache enpointCache)
     : base(encoder, bufferManager, channelManager, null)
 {
     Via               = via;
     RemoteAddress     = remoteAddress;
     this.enpointCache = enpointCache;
 }