public static SearchProductProjectionsCommand Limit(this SearchProductProjectionsCommand command, int limit) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Limit = limit; return(command); }
public static SearchProductProjectionsCommand Offset(this SearchProductProjectionsCommand command, int offset) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Offset = offset; return(command); }
public static SearchProductProjectionsCommand Sort(this SearchProductProjectionsCommand command, Expression <Func <ProductProjection, IComparable> > expression, SortDirection sortDirection = SortDirection.Ascending) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Sort.Add(new Sort <ProductProjection>(expression, sortDirection).ToString()); return(command); }
public static SearchProductProjectionsCommand Fuzzy(this SearchProductProjectionsCommand command, bool fuzzy) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Fuzzy = fuzzy; return(command); }
public static SearchProductProjectionsCommand TermFacet(this SearchProductProjectionsCommand command, Expression <Func <ProductProjection, IComparable> > expression) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Facets.Add(new TermFacet <ProductProjection>(expression).ToString()); return(command); }
public static SearchProductProjectionsCommand FilterFacets(this SearchProductProjectionsCommand command, Expression <Func <ProductProjection, bool> > expression) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.FilterFacets.Add(new Filter <ProductProjection>(expression).ToString()); return(command); }
public static SearchProductProjectionsCommand SetPriceCustomerGroup(this SearchProductProjectionsCommand command, string priceCustomerGroup) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.PriceCustomerGroup = priceCustomerGroup; return(command); }
public static SearchProductProjectionsCommand SetPriceChannel(this SearchProductProjectionsCommand command, string priceChannel) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.PriceChannel = priceChannel; return(command); }
public static SearchProductProjectionsCommand MarkMatchingVariants(this SearchProductProjectionsCommand command, bool markMatchingVariants) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.MarkMatchingVariants = markMatchingVariants; return(command); }
public static SearchProductProjectionsCommand SetPriceCountry(this SearchProductProjectionsCommand command, string priceCountry) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.PriceCountry = priceCountry; return(command); }
public static SearchProductProjectionsCommand RangeFacet(this SearchProductProjectionsCommand command, string expression) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Facets.Add(expression); return(command); }
public static SearchProductProjectionsCommand FilterQuery(this SearchProductProjectionsCommand command, string expression) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.FilterQuery.Add(expression); return(command); }
public static SearchProductProjectionsCommand WithTotal(this SearchProductProjectionsCommand command, bool withTotal) { if (command.SearchParameters != null && command.SearchParameters is IPageable pageableParams) { pageableParams.WithTotal = withTotal; } return(command); }
public static SearchProductProjectionsCommand Offset(this SearchProductProjectionsCommand command, int offset) { if (command.SearchParameters != null && command.SearchParameters is IPageable pageableParams) { pageableParams.Offset = offset; } return(command); }
public static SearchProductProjectionsCommand FuzzyLevel(this SearchProductProjectionsCommand command, int fuzzyLevel) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Fuzzy = fuzzyLevel >= 0; p.FuzzyLevel = Math.Min(Math.Max(fuzzyLevel, 0), 2); return(command); }
public static SearchProductProjectionsCommand Sort(this SearchProductProjectionsCommand command, Expression <Func <ProductProjection, IComparable> > expression, SortDirection sortDirection = SortDirection.Ascending) { if (command.SearchParameters != null && command.SearchParameters is ISortable sortableParams) { sortableParams.Sort.Add(new Sort <ProductProjection>(expression, sortDirection).ToString()); } return(command); }
public static SearchProductProjectionsCommand Sort(this SearchProductProjectionsCommand command, string expression) { if (command.SearchParameters != null && command.SearchParameters is ISortable sortableParams) { sortableParams.Sort.Add(expression); } return(command); }
public static SearchProductProjectionsCommand Limit(this SearchProductProjectionsCommand command, int limit) { if (command.SearchParameters != null && command.SearchParameters is IPageable pageableParams) { pageableParams.Limit = limit; } return(command); }
public static SearchProductProjectionsCommand RangeFacet(this SearchProductProjectionsCommand command, string alias, Expression <Func <ProductProjection, bool> > expression) { var p = command.SearchParameters as ProductProjectionSearchParameters; var rangeFacet = new RangeFacet <ProductProjection>(expression); rangeFacet.Alias = alias; p.Facets.Add(rangeFacet.ToString()); return(command); }
public static SearchProductProjectionsCommand FilteredFacet(this SearchProductProjectionsCommand command, string alias, Expression <Func <ProductProjection, bool> > expression, bool isCountingProducts = false) { var p = command.SearchParameters as ProductProjectionSearchParameters; var filteredFacet = new FilterFacet <ProductProjection>(expression) { Alias = alias, IsCountingProducts = isCountingProducts }; p.Facets.Add(filteredFacet.ToString()); return(command); }
public static SearchProductProjectionsCommand RangeFacet(this SearchProductProjectionsCommand command, Expression <Func <ProductProjection, bool> > expression, bool isCountingProducts = false) { var p = command.SearchParameters as ProductProjectionSearchParameters; p.Facets.Add(new RangeFacet <ProductProjection>(expression) { IsCountingProducts = isCountingProducts }.ToString()); return(command); }
public ClientProductProjectionSearchProvider(IClient client, SearchProductProjectionsCommand command) { this.client = client; this.Command = command; }
public ClientQueryableCollection(IClient client, SearchProductProjectionsCommand command) { this.Provider = new ClientProductProjectionSearchProvider(client, command); this.Expression = Expression.Constant(this); }