private IReadOnlyCollection <PackageInProject> FilteredByIncludeExclude(IReadOnlyCollection <PackageInProject> all, Regex includes, Regex excludes) { var filteredByIncludeExclude = all .Where(package => RegexMatch.IncludeExclude(package.Id, includes, excludes)) .ToList(); if (filteredByIncludeExclude.Count < all.Count) { var filterDesc = string.Empty; if (excludes != null) { filterDesc += $"Exclude '{excludes}'"; } if (includes != null) { filterDesc += $"Include '{includes}'"; } _logger.Normal($"Filtered by {filterDesc} from {all.Count} to {filteredByIncludeExclude.Count}"); } return(filteredByIncludeExclude); }
private static bool MatchesIncludeExclude(Repository repo, SourceControlServerSettings settings) { return(RegexMatch.IncludeExclude(repo.Name, settings.IncludeRepos, settings.ExcludeRepos)); }
private static bool MatchesIncludeExclude(Abstractions.CollaborationModels.Repository repo, SourceControlServerSettings settings) { return(RegexMatch.IncludeExclude(repo.Name, settings.IncludeRepos, settings.ExcludeRepos)); }
private bool MatchesIncludeExclude(PackageUpdateSet packageUpdateSet) { return(RegexMatch.IncludeExclude(packageUpdateSet.SelectedId, _settings.Includes, _settings.Excludes)); }