Example #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))));
 }
Example #2
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_cylinders.Any() || _cylinders.Contains(car.Cylinders));
 }
Example #3
0
 public bool MatchesThis(CarForSale car)
 {
     return(_cityMpg.IsNullOrEmpty() || _cityMpg == car.CityMpg);
 }
Example #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()));
 }
Example #5
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_driveTypes.Any() || _driveTypes.Contains(car.DriveType));
 }
Example #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()));
 }
Example #7
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_newStatus.HasValue || _newStatus.Value == car.IsNewStatus);
 }
Example #8
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_fuelTypeIds.Any() || _fuelTypeIds.Contains(car.FuelTypeId));
 }
Example #9
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_trannyTypes.Any() || _trannyTypes.Contains(car.TransmissionType));
 }
Example #10
0
 public bool MatchesThis(CarForSale car)
 {
     return((_optionBits & car.OptionBits) == _optionBits);
 }
Example #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()));
 }
Example #12
0
 bool IExclusion.MatchesThis(CarForSale car)
 {
     return(!_dealers.Contains(car.DealerId));
 }
Example #13
0
 public bool MatchesThis(CarForSale car)
 {
     return(!_trimIds.Any() || _trimIds.Contains(car.TrimId));
 }