static void Main(string[] args) { // This will work for now but really ought to have DI/IoC. var bs = new BusinessService(); var udcs = new UserDataCollectionService(bs); var rs = new ReportService(bs, udcs); var tfs = new TextFileService(udcs); //if args < 1 abort if (args.Length == 0) { Console.WriteLine("Please provide a filename as an argument to this program."); } else { foreach (var filename in args) { tfs.ReadAndProcessTextFile(filename); } Console.Write(rs.GenerateReport()); } Console.ReadKey(); //keep window open until enter pressed to see output }
public UserDataCollectionService(BusinessService bs) { this.bs = bs; AllRegisteredDrivers = new List <Driver>(); AllTrips = new List <Trip>(); }
public ReportService(BusinessService bs, UserDataCollectionService udcs) { this.bs = bs; this.udcs = udcs; }