Пример #1
0
 public void CompositeMatching(CompositeGlob compositeGlob, string stringToMatch, bool shouldMatch)
 {
     if (shouldMatch)
     {
         Assert.True(compositeGlob.IsMatch(stringToMatch));
     }
     else
     {
         Assert.False(compositeGlob.IsMatch(stringToMatch));
     }
 }
Пример #2
0
        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())));
        }