public static bool InRangeCarbohydrate(this ICaloriesProvider product, int?min, int?max) { if (min.HasValue && product.Carbohydrate < min.Value) { return(false); } if (max.HasValue && product.Carbohydrate > max.Value) { return(false); } return(true); }
public static bool InRangeFat(this ICaloriesProvider product, int?min, int?max) { if (min.HasValue && product.Fat < min.Value) { return(false); } if (max.HasValue && product.Fat > max.Value) { return(false); } return(true); }
public static bool InRangeCarbohydrate(this ICaloriesProvider product, SearchRange range) { return(product.InRangeCarbohydrate(range.MinValue, range.MaxValue)); }
public static bool InRangeProtein(this ICaloriesProvider product, SearchRange range) { return(product.InRangeProtein(range.MinValue, range.MaxValue)); }