Beispiel #1
0
 public bool Add(ICmd cmd)
 {
     lock (CmdLock)
     {
         CmdQueue.Enqueue(cmd);
         return(true);
     }
 }
Beispiel #2
0
 public bool AddRange(ICmd[] cmds)
 {
     lock (CmdLock)
     {
         if (CmdQueue.Count != 0)
         {
             return(false);
         }
         foreach (ICmd cmd in cmds)
         {
             CmdQueue.Enqueue(cmd);
         }
         CmdQueue.Peek().IsReapteCmd = true;
         return(true);
     }
 }