Пример #1
0
 public static void Send(ICommand cmd, string tokenSession = "", bool asyncExec = true)
 {
     if (tokenSession != "")
     {
         cmd.TokenSession = tokenSession;
     }
     CommandsAndEventsRegisterEngine.PushCommand(cmd, asyncExec);
 }
 public static void Send(ICommand cmd)
 {
     if (cmd.PublishedCommandId == null || cmd.PublishedCommandId == Guid.Empty)
     {
         cmd.PublishedCommandId = Guid.NewGuid();
     }
     CommandsAndEventsRegisterEngine.PushCommand(cmd, RedisServices.IsEnable);
     Console.WriteLine("Sent");
     Console.WriteLine(JsonConvert.SerializeObject(cmd));
 }