public static IChannel CreateServerChannel(ServerChannelDetails details) { var props = new Dictionary<string, string>(); props["port"] = details.Port.ToString(); var serverProvider = new BinaryServerFormatterSinkProvider(); serverProvider.TypeFilterLevel = TypeFilterLevel.Full; switch (details.Mode) { case ChannelMode.NamedPipe: return new IpcChannel(props, null, serverProvider); case ChannelMode.TCPIP: return new TcpChannel(props, null, serverProvider); default: return null; } }
public void AddChannel(ServerChannelDetails details) { AddChannel(ChannelFactory.CreateServerChannel(details)); }