Example #1
0
 public static FileState GetInstance()
 {
     if (_instance == null)
     {
         _instance = new FileClosed();
     }
     return(_instance);
 }
Example #2
0
 public void Close()
 {
     Console.WriteLine("Zamykam plik");
     _context.ChangeState(FileClosed.GetInstance());
 }