コード例 #1
0
        public List <StateEvent> ProcessCommand(IStateCommandProtocol command)
        {
            var ev = new List <StateEvent>();

            _currentLeaf = _currentLeaf.ProcessCommand(command, ev);
            return(ev);
        }
コード例 #2
0
        public StateLeaf ProcessCommand(IStateCommandProtocol command, List <StateEvent> events)
        {
            var nextState = command.Process(State, events);
            var next      = new StateLeaf(nextState);

            next._previousLeaf = this;
            this._nextLeaf     = next;
            return(next);
        }
コード例 #3
0
 public bool CanProcessCommand(IStateCommandProtocol command)
 {
     return(command.CanProcess(State));
 }
コード例 #4
0
 public bool CanProcessCommand(IStateCommandProtocol command)
 {
     return(_currentLeaf.CanProcessCommand(command));
 }