예제 #1
0
        private IEnumerable <Guid> Extract(ITaxonomyExtractSet set)
        {
            var result        = new List <Guid>();
            var taxonomyTypes = TaxonomyRepository.GetAllTaxonomyTypes().ToList();

            foreach (var taxonomyType in taxonomyTypes)
            {
                if (set.TaxonomyDictionary.TryGetValue(taxonomyType.Code, out var targetItems))
                {
                    result.AddRange(taxonomyType.TaxonomyItems.Where(i => targetItems == null || !targetItems.Any() || targetItems.Contains(i.Code)).Select(i => i.NodeGUID));
                }
            }
            return(result);
        }
예제 #2
0
 public IEnumerable <T> GetItems(ITaxonomyExtractSet set, int skip = 0, int take = Int32.MaxValue, string searchSort = "")
 {
     return(GetItems(Extract(set), skip, take, searchSort));
 }