public void AddContract <TContract>(ChannelConfig config) { var contract = ContractDescription <TContract> .Create(); contract.ValidateImplementation(this.type.GetTypeInfo()); var cm = new ChannelManager(contract, config); this.channelManagers.Add(contract.ContractName, cm); }
private void CreateProxy <TService>(Socket socket, string server, int port, ChannelConfig config, bool open) { TcpProxys.Add(new TcpProxy() { socket = socket, Config = config, Open = open, Server = server, Port = port, Contract = ContractDescription <TService> .Create(), InterfaceType = typeof(TService) }); }
static ChannelFactory() { ImplementingType = typeof(InnerProxy); Contract = ContractDescription <T> .Create(); }