Ejemplo n.º 1
0
 /**
  * The two parameters are assigned.
  *
  * parameter textStorage: The TextStorage object to save
  * parameter text: The string which the user wrote in console
  */
 public SnapShot(TextStorage textStorage, string text)
 {
     this.textStorage = textStorage;
     this.text        = text;
 }
Ejemplo n.º 2
0
 /**
  * Makes a backup by creating a snapshot
  * of the provided TextStorage.
  *
  * parameter storage: The TextStorage object to create a backup of
  */
 public void MakeBackup(TextStorage storage)
 {
     backup = storage.CreateSnapshot();
     UndoStack.PushToStack(backup);
 }