public void CompositeMatching(CompositeGlob compositeGlob, string stringToMatch, bool shouldMatch) { if (shouldMatch) { Assert.True(compositeGlob.IsMatch(stringToMatch)); } else { Assert.False(compositeGlob.IsMatch(stringToMatch)); } }
public bool ContainsItems(CompositeGlob items, string[] projectItemTypes = null) { IEnumerable <ProjectItem> projectItems = _project.Items; if (projectItemTypes != null && projectItemTypes.Length > 0) { projectItems = projectItems.Where(i => projectItemTypes.Contains(i.ItemType)); } return(projectItems.Any(i => items.IsMatch(i.GetFullPath()))); }