示例#1
0
文件: Command.cs 项目: barisozluk/KLC
        public void Execute(object parameter = default)
        {
            Parameters = parameter.Cast <TParameter>();

            Result = this._execute(Parameters, Result).Cast <TResult>();

            ICommandWithUndoRedo.AddInUndo(this.Clone() as ICommandWithUndoRedo);

            ICommandWithUndoRedo.StackRedo.Clear();

            Result = default(TResult);

            Parameters = default(TParameter);

            OnExecute?.Invoke();
        }
示例#2
0
文件: Command.cs 项目: barisozluk/KLC
        void ICommandWithUndoRedo.ExecuteWithSubscribe()
        {
            this.Result = this._execute(this.Parameters, this.Result);

            ICommandWithUndoRedo.AddInUndo(this.Clone() as ICommandWithUndoRedo);
        }