コード例 #1
0
        bool IsIncluded(string assemblyNameOrFileName)
        {
            var isExplicitlyExcluded = AssembliesToSkip.Any(excluded => IsMatch(excluded, assemblyNameOrFileName));

            if (isExplicitlyExcluded)
            {
                return(false);
            }

            var isExcludedByDefault = DefaultAssemblyExclusions.Any(exclusion => IsMatch(exclusion, assemblyNameOrFileName));

            if (isExcludedByDefault)
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        /// <summary>
        ///  Determines whether the specified assembly name or file name can be included, given the set up include/exclude
        ///  patterns and default include/exclude patterns
        /// </summary>
        bool IsIncluded(string assemblyNameOrFileName)
        {
            var isExplicitlyExcluded = AssembliesToSkip.Any(excluded => IsMatch(excluded, assemblyNameOrFileName));

            if (isExplicitlyExcluded)
            {
                return(false);
            }

            var isExcludedByDefault = DefaultAssemblyExclusions.Any(exclusion => IsMatch(exclusion, assemblyNameOrFileName));

            if (isExcludedByDefault)
            {
                return(false);
            }

            var noAssembliesWereExplicitlyIncluded = !AssembliesToInclude.Any();
            var isExplicitlyIncluded = AssembliesToInclude.Any(included => IsMatch(included, assemblyNameOrFileName));

            return(noAssembliesWereExplicitlyIncluded || isExplicitlyIncluded);
        }