public void BuildInputChannelListener() { PeerTransportBindingElement be = new PeerTransportBindingElement(); be.Security.Mode = SecurityMode.None; CustomBinding binding = new CustomBinding( new HandlerTransportBindingElement(null)); BindingContext ctx = new BindingContext( binding, new BindingParameterCollection()); ctx.ListenUriBaseAddress = new Uri("net.p2p:foobar"); be.BuildChannelListener <IInputChannel> (ctx); }
public void BuildReplyChannelListener() { // IReplyChannel is invalid PeerTransportBindingElement be = new PeerTransportBindingElement(); be.Security.Mode = SecurityMode.None; CustomBinding binding = new CustomBinding( new HandlerTransportBindingElement(null)); BindingContext ctx = new BindingContext( binding, new BindingParameterCollection()); be.BuildChannelListener <IReplyChannel> (ctx); }
public void BuildReplyChannelListener () { // IReplyChannel is invalid PeerTransportBindingElement be = new PeerTransportBindingElement (); be.Security.Mode = SecurityMode.None; CustomBinding binding = new CustomBinding ( new HandlerTransportBindingElement (null)); BindingContext ctx = new BindingContext ( binding, new BindingParameterCollection ()); be.BuildChannelListener<IReplyChannel> (ctx); }
public void MaxBufferPoolSizeTooSmall () { PeerTransportBindingElement be = new PeerTransportBindingElement (); be.MaxBufferPoolSize = 0x1000; be.Security.Mode = SecurityMode.None; CustomBinding binding = new CustomBinding ( new HandlerTransportBindingElement (null)); BindingContext ctx = new BindingContext ( binding, new BindingParameterCollection ()); ctx.ListenUriBaseAddress = new Uri ("net.p2p:foobar"); be.BuildChannelListener<IInputChannel> (ctx); }
public void InvalidListenIPAddress () { PeerTransportBindingElement be = new PeerTransportBindingElement (); be.Security.Mode = SecurityMode.None; be.ListenIPAddress = IPAddress.Parse ("127.0.0.1"); CustomBinding binding = new CustomBinding ( new HandlerTransportBindingElement (null)); BindingContext ctx = new BindingContext ( binding, new BindingParameterCollection ()); ctx.ListenUriBaseAddress = new Uri ("net.p2p:foobar"); be.BuildChannelListener<IInputChannel> (ctx); }