Ejemplo n.º 1
0
 private IpcResponse ActionCmdHandler(IpcMessage msg)
 {
     try
     {
         var inParams = msg.GetData <ActionCmdParams>();
         ActionCmdReceived?.Invoke(this, inParams);
         return(GetOkResponse());
     }
     catch (Exception ex)
     {
         return(GetErrorResponse(ex, nameof(ActionCmdHandler)));
     }
 }
Ejemplo n.º 2
0
 private IpcResponse FuncCmdHandler(IpcMessage msg)
 {
     try
     {
         var inParams = msg.GetData <FuncCmdInParams>();
         var e        = new FuncCmdParams {
             InParams = inParams
         };
         FuncCmdReceived?.Invoke(this, e);
         var response = GetOkResponse();
         response.SetData(e.OutParams);
         return(response);
     }
     catch (Exception ex)
     {
         return(GetErrorResponse(ex, nameof(FuncCmdHandler)));
     }
 }