Beispiel #1
0
        public override void ExecuteCommand(StringClient session, StringPackageInfo commandInfo)
        {
            log4j.Debug("ResponseAdd: " + commandInfo.Body);

            // after received data, pass the data to EventHandler
            Data.ResponseAdd responseAdd = Newtonsoft.Json.JsonConvert.DeserializeObject <Data.ResponseAdd>(commandInfo.Body);
            session.PushToResponseAddHandler(responseAdd);
        }
Beispiel #2
0
 public override void ExecuteCommand(StringClient session, StringPackageInfo commandInfo)
 {
     log4j.Debug("ResponseAdd: " + commandInfo.Body);
     try
     {
         // after received data, pass the data to EventHandler
         TcpClientServer.Data.ResponseAdd responseAdd = Newtonsoft.Json.JsonConvert.DeserializeObject <TcpClientServer.Data.ResponseAdd>(commandInfo.Body);
         session.PushToResponseAddHandler(responseAdd);
     }
     catch (Exception ex)
     {
         log4j.Error("", ex);
     }
 }