Example #1
0
        public List <FilterDto> GetFilters()
        {
            IList <AvailableFilter> filters = _cache.GetAvailableFilters(_filterManager.GetAvailableFiltersIncludingOptions);

            var result = filters.Select(filter => new FilterDto
            {
                Name    = filter.Name,
                Options = filter.Options.OrderBy(o => o).ToList()
            })
                         .OrderBy(f => f.Name)
                         .ToList();

            return(result);
        }
Example #2
0
        /// <summary>
        /// Gets the filters to select the user agents
        /// </summary>
        /// <returns>The filters name and sub options</returns>
        public List <FilterDto> GetFilters()
        {
            // TODO: Add "All" filtering with A-G G-Z possibilities
            IList <AvailableFilter> filters = _cache.GetAvailableFilters(_filterManager.GetAvailableFiltersIncludingOptions);

            var result = filters.Select(filter => new FilterDto
            {
                Name    = filter.Name,
                Options = filter.Options.OrderBy(o => o).ToList()
            })
                         .OrderBy(f => f.Name)
                         .ToList();

            return(result);
        }