예제 #1
0
 public static FileReader GetFileReaderForInput(string filepath, BankSystemDisplay display)
 {
     if (filepath.EndsWith(".csv"))
     {
         return(new CSVFileReader(filepath, display));
     }
     else if (filepath.EndsWith(".json"))
     {
         return(new JSONFileReader(filepath, display));
     }
     else if (filepath.EndsWith(".xml"))
     {
         return(new XMLFileReader(filepath, display));
     }
     else
     {
         throw new FileNotFoundException("File wasn't loaded: that file type isn't supported.");
     }
 }
 public ConsoleBankSystemInput(Bank bank, BankSystemDisplay display)
 {
     this.BankSystem = bank;
     this.Display    = display;
 }
예제 #3
0
 public CSVFileReader(string filepath, BankSystemDisplay display)
 {
     this.Filepath = filepath;
     this.Display  = display;
 }