Ejemplo n.º 1
0
 public void OnCreateClient()
 {
     try
     {
         clientContext = new TcpServiceHostClient <IAtmanService>(AtmanServerConfigData.ServiceName);
         clientService = clientContext.Connect(AtmanServerConfigData.IP, AtmanServerConfigData.Port);
     }
     catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); }
 }
Ejemplo n.º 2
0
        public IAtmanService GetClientService()
        {
            try
            {
                TcpServiceHostClient <IAtmanService> clientNew = new TcpServiceHostClient <IAtmanService>(AtmanServerConfigData.ServiceName);
                IAtmanService clientServiceNew = clientNew.Connect(AtmanServerConfigData.IP, AtmanServerConfigData.Port);

                return(clientServiceNew);
            }
            catch (Exception ex) {
                System.Diagnostics.Debug.WriteLine(ex.Message);
                return(null);
            }
        }