コード例 #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);
        }