UnitResult IUndoableUnit.Undo() { var args = new UnitEventArgs <T>(Argument); OnUndo(args); return(args.UnitResult); }
internal UnitResult Repeat() { var eventArgs = new UnitEventArgs <T>(Argument, UnitMode.Repeat); OnExecute(eventArgs); return(eventArgs.UnitResult); }
UnitResult IInternalUnit.PerformUnit(object argument, UnitMode unitMode) { Argument = (T)argument; var eventArgs = new UnitEventArgs <T>(Argument, unitMode); OnExecute(eventArgs); return(eventArgs.UnitResult); }
void OnExecute(object sender, UnitEventArgs <T> e) { ExecuteInternal(unitDictionary, e.UnitMode); }
void OnUndo(object sender, UnitEventArgs <T> e) { UndoInternal(unitDictionary); }
void OnUndo(UnitEventArgs <T> e) { Undo?.Invoke(this, e); }
void OnExecute(UnitEventArgs <T> e) { execute?.Invoke(this, e); }