public bool Add(ICmd cmd) { lock (CmdLock) { CmdQueue.Enqueue(cmd); return(true); } }
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); } }