Example #1
0
 public void Save(Canon144Z canon)
 {
     if (canon == null)
     {
         throw new ArgumentNullException("No printer");
     }
     memento = canon.GetPrinter();
     Console.WriteLine("Save state");
 }
Example #2
0
 public void LoadState(Canon144Z canon)
 {
     if (canon == null)
     {
         throw new ArgumentNullException("No printer");
     }
     if (memento == null)
     {
         throw new ArgumentNullException("Memento is null");
     }
     canon.SetMemento(memento);
     Console.WriteLine("Load");
 }