Bari.Core.Model.SourceSetIgnoreList.IsIgnored C# (CSharp) Method

IsIgnored() public method

public IsIgnored ( SuiteRelativePath path ) : bool
path SuiteRelativePath
return bool
        public bool IsIgnored(SuiteRelativePath path)
        {
            return ignoreExpressions.Any(expression => expression.IsMatch(path));
        }

Usage Example

Beispiel #1
0
        public void SingleIgnoreExpression()
        {
            var ignoreList = new SourceSetIgnoreList();
            ignoreList.Add(@".+\.tmp$");

            ignoreList.IsIgnored(new SuiteRelativePath(@"a\b\c.dll.tmp")).Should().BeTrue();
            ignoreList.IsIgnored(new SuiteRelativePath(@"x.tmp")).Should().BeTrue();
            ignoreList.IsIgnored(new SuiteRelativePath(@"a\tmp\c.dll")).Should().BeFalse();
            ignoreList.IsIgnored(new SuiteRelativePath(@"tmp")).Should().BeFalse();
        }
SourceSetIgnoreList