public IReadOnlyList <IncludeItem> GetFlattenedItems(Log log = null, bool force = false) { if (_flattenedItemsDirty || force) { _flattenedItems.Clear(); IncludeGlobber.FindItems(this, IncludeItems, ExcludeItems, _flattenedItems, log, !force); _flattenedItemsDirty = false; } return(_flattenedItems); }
public void GlobItems(Log log, IEnumerable <string> patterns, bool exludeItems = false) { // Copy flattened items before clearing var flattenedItems = GetFlattenedItems(log, true).ToArray(); var includeItems = patterns.Select(x => new IncludeItem(Source, IncludeItemType.Glob, x)); MutableIncludeItems.Clear(); MutableIncludeItems.AddRange(flattenedItems); IncludeGlobber.FindItems(this, includeItems, ExcludeItems, MutableIncludeItems, log, false, exludeItems); MutableIncludeItems.Sort(); }