Пример #1
0
 /// <summary>
 /// Creates new undo object for recording actions with using pattern.
 /// </summary>
 /// <param name="undo">The undo/redo object.</param>
 /// <param name="snapshotInstances">Instances of objects to record.</param>
 /// <param name="actionString">Name of action to be displayed in undo stack.</param>
 /// <param name="customActionBefore">Custom action to append to the undo block action before recorded modifications apply.</param>
 /// <param name="customActionAfter">Custom action to append to the undo block action after recorded modifications apply.</param>
 public UndoMultiBlock(Undo undo, IEnumerable <object> snapshotInstances, string actionString, IUndoAction customActionBefore = null, IUndoAction customActionAfter = null)
 {
     _snapshotUndoInternal = snapshotInstances.ToArray();
     _undo = undo;
     _undo.RecordMultiBegin(_snapshotUndoInternal, actionString);
     _customActionBefore = customActionBefore;
     _customActionAfter  = customActionAfter;
 }
Пример #2
0
 /// <summary>
 /// Creates new undo object for recording actions with using pattern.
 /// </summary>
 /// <param name="undo">The undo/redo object.</param>
 /// <param name="snapshotInstances">Instances of objects to record.</param>
 /// <param name="actionString">Name of action to be displayed in undo stack.</param>
 public UndoMultiBlock(Undo undo, IEnumerable <object> snapshotInstances, string actionString)
 {
     _snapshotUndoInternal = snapshotInstances.ToArray();
     _undo = undo;
     _undo.RecordMultiBegin(_snapshotUndoInternal, actionString);
 }