예제 #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
파일: Project.cs 프로젝트: 4ux-nbIx/projctl
        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())));
        }