private static ProductsSearchSortTypeListItem GetSortTypeItem(ProductsSearchSortType sortType, bool isRev) { return(ProductsSearchParamsViewModel._sortTypes.FirstOrDefault <ProductsSearchSortTypeListItem>((Func <ProductsSearchSortTypeListItem, bool>)(type => { if (type.SortType == sortType) { return type.IsRev == isRev; } return false; }))); }
public ProductsSearchSortTypeListItem(string text, ProductsSearchSortType sortType = ProductsSearchSortType.Default, bool isRev = false) { this.Text = text; this.SortType = sortType; this.IsRev = isRev; }
private static ProductsSearchSortTypeListItem GetSortTypeItem(ProductsSearchSortType sortType, bool isRev) { return(Enumerable.FirstOrDefault <ProductsSearchSortTypeListItem>(ProductsSearchParamsViewModel._sortTypes, (ProductsSearchSortTypeListItem type) => type.SortType == sortType && type.IsRev == isRev)); }