コード例 #1
0
        public List<Item> GetAllItems(string startPath, IItemFinderCriterion criteria)
        {
            EnqueueItems(m_database.SelectItems(startPath));
            var results = new List<Item>();

            while(m_itemsToBeProcessed.Count > 0)
            {
                Item currentlyProcessedItem = m_itemsToBeProcessed.Dequeue();

                if(currentlyProcessedItem.HasChildren)
                {
                    EnqueueItems(currentlyProcessedItem.Children.ToArray());
                }

                if (criteria.Match(currentlyProcessedItem))
                {
                    results.Add(currentlyProcessedItem);
                }
            } 

            return results;
        }
コード例 #2
0
        public List <Item> GetAllItems(string startPath, IItemFinderCriterion criteria)
        {
            EnqueueItems(m_database.SelectItems(startPath));
            var results = new List <Item>();

            while (m_itemsToBeProcessed.Count > 0)
            {
                Item currentlyProcessedItem = m_itemsToBeProcessed.Dequeue();

                if (currentlyProcessedItem.HasChildren)
                {
                    EnqueueItems(currentlyProcessedItem.Children.ToArray());
                }

                if (criteria.Match(currentlyProcessedItem))
                {
                    results.Add(currentlyProcessedItem);
                }
            }

            return(results);
        }
コード例 #3
0
 public List<Item> GetAllItems(IItemFinderCriterion criteria)
 {
     return GetAllItems(RootNodePath, criteria);
 }
コード例 #4
0
 public List <Item> GetAllItems(IItemFinderCriterion criteria)
 {
     return(GetAllItems(RootNodePath, criteria));
 }