public void ReDo() { ICMD cmd = CalcleQueue.Dequeue(); cmd.Do(); CommandQueue.Enqueue(cmd); }
public void Do(ICMD cmd) { if (this.userInfo == null) { throw new NotLoginException(); } if (!(new UserValidator(this.userInfo).CheckAuth(cmd.RequiredAuth))) { throw new NotAuthException(); } if (CommandQueue == null) { CommandQueue = new Queue <ICMD>(); } CommandQueue.Enqueue(cmd); cmd.Do(); }