예제 #1
0
        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);
        }
예제 #2
0
 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)
     });
 }
예제 #3
0
 static ChannelFactory()
 {
     ImplementingType = typeof(InnerProxy);
     Contract         = ContractDescription <T> .Create();
 }