Example #1
0
 public static void AddAction(StackAction act)
 {
     try
     {
         actionList.Add(act);
         actionList.Sort((x,y)=>x.ExecuteDate.CompareTo(y.ExecuteDate));
         LogWriter.WriteLogSucces(string.Format("Action {0} added to stack. Time of execution: {1}", act.GetType(), act.ExecuteDate.ToString("hh:mm:ss")));
     }
     catch(Exception ex)
     {
         LogWriter.WriteLogOnException(ex);
         AddAction(act);
     }
 }
Example #2
0
 static void RemoveAction(StackAction act)
 {
     if (actionList.Remove(act)==false)
        throw new Exception("Cant remove action from stack after execurion");
 }