Ejemplo n.º 1
0
        public NamedPipeChannelFactory(NamedPipeTransportBindingElement source, BindingContext ctx)
        {
            foreach (BindingElement be in ctx.RemainingBindingElements)
            {
                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                if (mbe != null)
                {
                    encoder = CreateEncoder <TChannel> (mbe);
                    quotas  = mbe.GetProperty <XmlDictionaryReaderQuotas> (ctx);
                    break;
                }
            }
            if (encoder == null)
            {
                encoder = new BinaryMessageEncoder();
            }

            this.source = source;
        }
        public NamedPipeChannelListener(NamedPipeTransportBindingElement source, BindingContext context)
            : base(context)
        {
            foreach (BindingElement be in context.Binding.Elements)
            {
                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                if (mbe != null)
                {
                    MessageEncoder = CreateEncoder <TChannel> (mbe);
                    quotas         = mbe.GetProperty <XmlDictionaryReaderQuotas> (context);
                    break;
                }
            }

            if (MessageEncoder == null)
            {
                MessageEncoder = new BinaryMessageEncoder();
            }
        }
Ejemplo n.º 3
0
        public TcpChannelFactory(TcpTransportBindingElement source, BindingContext ctx)
        {
            MessageEncoder            encoder = null;
            XmlDictionaryReaderQuotas quotas  = null;

            foreach (BindingElement be in ctx.RemainingBindingElements)
            {
                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                if (mbe != null)
                {
                    encoder = CreateEncoder <TChannel> (mbe);
                    quotas  = mbe.GetProperty <XmlDictionaryReaderQuotas> (ctx);
                    break;
                }
            }
            if (encoder == null)
            {
                encoder = new BinaryMessageEncoder();
            }
            info = new TcpChannelInfo(source, encoder, quotas);
        }
Ejemplo n.º 4
0
        public TcpChannelListener(TcpTransportBindingElement source, BindingContext context)
            : base(context)
        {
            XmlDictionaryReaderQuotas quotas = null;

            foreach (BindingElement be in context.Binding.Elements)
            {
                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                if (mbe != null)
                {
                    MessageEncoder = CreateEncoder <TChannel> (mbe);
                    quotas         = mbe.GetProperty <XmlDictionaryReaderQuotas> (context);
                    break;
                }
            }

            if (MessageEncoder == null)
            {
                MessageEncoder = new BinaryMessageEncoder();
            }

            info = new TcpChannelInfo(source, MessageEncoder, quotas);
        }