static void Main(string[] args) { CustomerReader cr = new CustomerReader(); cr.readCustomersCsv("C:\\Git\\CustomerReader\\doc\\customers.csv"); cr.readCustomersXml("..\\..\\..\\doc\\customers.xml"); cr.readCustomersJson("..\\..\\..\\doc\\customers.json"); Console.WriteLine("Added this many customers: " + cr.getCustomers().Count + "\n"); cr.displayCustomers(); Console.ReadLine(); }
static void Main(string[] args) { string filePath = "..\\..\\..\\doc\\"; CustomerReader cr = new CustomerReader(); cr.ReadCustomersCsv(filePath + "customers.csv"); cr.ReadCustomersXml(filePath + "customers.xml"); cr.ReadCustomersJson(filePath + "customers.json"); Console.WriteLine("Added this many customers: " + cr.getCustomers().Count + "\n"); cr.DisplayCustomers(); Console.ReadLine(); }
static void Main(string[] args) { FileXML = ConfigurationManager.AppSettings["FileXML"]; FileCSV = ConfigurationManager.AppSettings["FileCSV"]; FileJSON = ConfigurationManager.AppSettings["FileJSON"]; CustomerReader cr = new CustomerReader(); CheckFiles(); if (isFileCSV) { cr.readCustomersCsv(FileCSV); } else { Console.WriteLine("Info: no feeds from file: " + FileCSV); } if (isFileXML) { cr.readCustomersXml(FileXML); } else { Console.WriteLine("Info: no feeds from file: " + FileXML); } if (isFileJSON) { cr.readCustomersJson(FileJSON); } else { Console.WriteLine("Info: no feeds from file: " + FileJSON); } Console.WriteLine("Added this many customers: " + cr.getCustomers().Count + "\n"); cr.displayCustomers(); Console.ReadLine(); }