예제 #1
0
        public void ReDo()
        {
            ICMD cmd = CalcleQueue.Dequeue();

            cmd.Do();
            CommandQueue.Enqueue(cmd);
        }
예제 #2
0
 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();
 }