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(); } }
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); }
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); }