static void Main() { var taxiProvider = new TaxiProvider(new List <Car> { new Car { ServiceClass = ServiceClass.Economy, AvailableSeatsCount = 2, IsNonSmokingDriver = true, IsSilentDriver = true, DriveStyle = DriveStyle.Careful, IsAvailable = true, SpokenLanguages = new List <string> { "English", "Chinese", "Turkish" } }, new Car { AvailableSeatsCount = 3, DriveStyle = DriveStyle.Standard, IsAvailable = true, SpokenLanguages = new List <string> { "French", "Chinese", "Romanian" } }, new Car { AvailableSeatsCount = 4, IsNonSmokingDriver = true, IsSilentDriver = true, DriveStyle = DriveStyle.Careful, SpokenLanguages = new List <string> { "Estonian", "Chinese", "Swahili" } } }); var client = new Client(DriveStyle.Careful, ServiceClass.Economy, 2, true, true, false, "Chinese"); client.OrderCar(taxiProvider); //... }
public void OrderCar(TaxiProvider taxiProvider) { taxiProvider.GetAvailableCar(DateTime.Now, GetPreferences); }
public void SetSpecialCircumstances(TaxiProvider taxiProvider, Func <Car, Car> func) { //*** For example ***// taxiProvider.GetAvailableCar(DateTime.Now, func(preferences)); }