static VendorResponse GetVendors() { VendorResponse response = new VendorResponse(); response.Results = new System.Collections.Generic.List <VendorDrivers>(); response.Results.Add(new VendorDrivers { VendorId = 1, Drivers = 1 }); response.Results.Add(new VendorDrivers { VendorId = 2, Drivers = 3 }); return(response); }
static void Main(string[] args) { Console.WriteLine("welcome to the vendor availability application"); meals = GetMeals(); vendors = GetVendors(); Console.WriteLine($"blackout time before is {BlackOutMinutesBefore} minutes"); Console.WriteLine($"if you want to change it, enter a number, if not press enter"); string input = Console.ReadLine(); if (!string.IsNullOrWhiteSpace(input)) { BlackOutMinutesBefore = Int32.Parse(input); } Console.WriteLine($"blackout time after is {BlackOutMinutesAfter} minutes"); Console.WriteLine($"if you want to change it, enter a number, if not press enter"); input = Console.ReadLine(); if (!string.IsNullOrWhiteSpace(input)) { BlackOutMinutesAfter = Int32.Parse(input); } IsAvailable(1, new DateTime(2017, 1, 1, 13, 41, 0)); IsAvailable(1, new DateTime(2017, 1, 1, 13, 59, 59)); IsAvailable(1, new DateTime(2017, 1, 1, 14, 30, 0)); IsAvailable(1, new DateTime(2017, 1, 1, 14, 39, 58)); IsAvailable(1, new DateTime(2017, 1, 1, 14, 40, 2)); IsAvailable(1, new DateTime(2017, 1, 1, 15, 0, 0)); IsAvailable(1, new DateTime(2017, 1, 1, 15, 1, 0)); IsAvailable(2, new DateTime(2017, 1, 1, 13, 30, 0)); IsAvailable(2, new DateTime(2017, 1, 1, 15, 0, 0)); IsAvailable(2, new DateTime(2017, 1, 1, 13, 41, 0)); IsAvailable(2, new DateTime(2017, 1, 1, 15, 01, 0)); }