Exemplo n.º 1
0
 public void WriteEvent(string description, string pars)
 {
     RunHistoryOperation(_subHistory, () =>
     {
         _subHistory.AddNew();
         _subHistory.Put("Description", description);
         _subHistory.Put("Params", pars);
         _subHistory.Put("Time", DateTime.Now);
         _subHistory.Put("HistoryId", _historyId);
         _subHistory.Put("FromStart", FromEvent);
         LogEventTime = DateTime.Now;
     });
 }
Exemplo n.º 2
0
 public void WriteStart(LogCommand command)
 {
     LogEventTime = DateTime.Now;
     RunHistoryOperation(_history, () =>
     {
         _history.AddNew();
         if (ProgressCommand != null)
         {
             _history.Put("SuperHistoryId", _superHistoryId);
         }
         _history.Put("Command", command.Name);
         _history.Put("Params", command.Params);
         _history.Put("Status", command.Status);
         _history.Put("Time", command.StartTime);
         _history.Put("Context", command.Context, true);
         _historyId = _history.GetInt("HistoryId");
     });
 }
Exemplo n.º 3
0
 public void WriteStartSuper(ProgressCommand command)
 {
     RunHistoryOperation(_superHistory, () =>
     {
         _superHistory.AddNew();
         _superHistory.Put("Command", command.Name);
         _superHistory.Put("Params", command.Params);
         _superHistory.Put("Context", command.Context, true);
         if (Logger.PeriodCommand != null)
         {
             _superHistory.Put("PeriodBegin", Logger.PeriodBegin);
             _superHistory.Put("PeriodEnd", Logger.PeriodEnd);
             _superHistory.Put("PeriodMode", Logger.PeriodMode);
         }
         _superHistory.Put("Status", command.Status);
         _superHistory.Put("Time", command.StartTime);
         _superHistoryId = _superHistory.GetInt("SuperHistoryId");
     });
 }
Exemplo n.º 4
0
 public void WriteErrorToList(CommandError error)
 {
     RunHistoryOperation(_errorsRec, () =>
     {
         _errorsRec.AddNew();
         _errorsRec.Put("Status", error.Quality.ToRussian());
         _errorsRec.Put("Description", error.Text);
         _errorsRec.Put("Params", error.ToLog());
         _errorsRec.Put("Time", DateTime.Now);
         if (LogCommand != null)
         {
             _errorsRec.Put("Command", LogCommand.Name);
             _errorsRec.Put("Context", LogCommand.Context);
         }
         if (Logger.PeriodCommand != null && ProgressCommand != null)
         {
             _errorsRec.Put("PeriodBegin", Logger.PeriodBegin);
             _errorsRec.Put("PeriodEnd", Logger.PeriodEnd);
         }
     });
 }