private static Predicate <string> PredicateFor(Feature feature) { var content = feature.Content; if (content.Include != null) { var include = Patterns.Include(content.Include); return(null == content.Exclude ? include : Patterns.And(include, Patterns.Exclude(content.Exclude))); } return(content.Exclude == null ? fileName => true : Patterns.Exclude(content.Exclude)); }
public void TestIncludeAllRecursivelyExcludingNonExistingSingle() { var found = finder.FindAll(Patterns.And(Patterns.Include(@"**\*.*"), Patterns.Exclude(@"Bin\NonExisting"))); AssertFiles(AllFiles(), found); }
public void TestIncludeAllRecursivelyExcludingSingle() { var found = finder.FindAll(Patterns.And(Patterns.Include(@"**\*.*"), Patterns.Exclude(@"Bin\OMNSetup.msi"))); AssertFiles(AllFiles().Except(new[] { (IFile)Bin["OMNSetup.msi"] }), found); }