Esempio n. 1
0
 public bool MatchesThis(CarForSale car)
 {
     return(_categoryMakeCombos.Any(combo =>
                                    combo.IgnoreThisComboMatch ||
                                    (car.CategoryId == combo.Id && combo.Name == String.Empty) ||
                                    (car.CategoryId == combo.Id && combo.Name.Equals(car.Make, StringComparison.InvariantCultureIgnoreCase))));
 }
Esempio n. 2
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_cylinders.Any() || _cylinders.Contains(car.Cylinders));
 }
Esempio n. 3
0
 public bool MatchesThis(CarForSale car)
 {
     return(_cityMpg.IsNullOrEmpty() || _cityMpg == car.CityMpg);
 }
Esempio n. 4
0
 public bool MatchesThis(CarForSale car)
 {
     // Because the vehicle's Mileage is a continuous value type, we are going to check between a range.
     return(!_mileages.Any() || _mileages.Contains(car.Mileage) || (car.Mileage >= _mileages.First() && car.Mileage <= _mileages.Last()));
 }
Esempio n. 5
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_driveTypes.Any() || _driveTypes.Contains(car.DriveType));
 }
Esempio n. 6
0
 public bool MatchesThis(CarForSale car)
 {
     // Because the vehicle's Year is a discrete value type, we are going to check for a specific match before we check between a range.
     return(!_years.Any() || _years.Contains(car.Year) || (car.Year >= _years.First() && car.Year <= _years.Last()));
 }
Esempio n. 7
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_newStatus.HasValue || _newStatus.Value == car.IsNewStatus);
 }
Esempio n. 8
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_fuelTypeIds.Any() || _fuelTypeIds.Contains(car.FuelTypeId));
 }
Esempio n. 9
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_trannyTypes.Any() || _trannyTypes.Contains(car.TransmissionType));
 }
Esempio n. 10
0
 public bool MatchesThis(CarForSale car)
 {
     return((_optionBits & car.OptionBits) == _optionBits);
 }
Esempio n. 11
0
 public bool MatchesThis(CarForSale car)
 {
     // Because the vehicle's AskingPrice is a continuous value type, we are going to check between a range.
     return(!_prices.Any() || (car.AskingPrice >= _prices.First() && car.AskingPrice <= _prices.Last()));
 }
Esempio n. 12
0
 bool IExclusion.MatchesThis(CarForSale car)
 {
     return(!_dealers.Contains(car.DealerId));
 }
Esempio n. 13
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_trimIds.Any() || _trimIds.Contains(car.TrimId));
 }