示例#1
0
 public CommandRunStateEventArgs(IEvent @event, IVersaCommand command, ICommandContext context,
                                 ECommandState state, Exception commandException = default)
 {
     Event            = @event;
     Command          = command;
     Context          = context;
     State            = state;
     CommandException = commandException;
 }
示例#2
0
            public Task DoExecuteCommand_Async(ECommandState eCommandState, IReadOnlyList <CancellationToken> arrCancelToken)
            {
                switch (eCommandState)
                {
                case ECommandState.None:
                    iExecutedIndex = ++g_iExecutedIndex;
                    break;

                case ECommandState.Undo:
                    break;

                case ECommandState.Redo:
                    break;
                }

                if (fWaitSecond == 0f)
                {
                    return(Task.CompletedTask);
                }


                return(Task.Delay((int)(fWaitSecond * 1000)));
            }
 public void _SetState(ECommandState state)
 {
     SetState(state);
 }
示例#4
0
 public virtual void Execute(TStateMachine owner)
 {
     m_CommandState = ECommandState.Running;
 }