Skip to content

Commit a0e738f

Browse files
committed
[GH Usage] Changed to ReadOnly collections
1 parent 714c0cd commit a0e738f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/NuGetGallery.Core/GitHub/GitHubUsageConfiguration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace NuGetGallery
99
{
1010
public class GitHubUsageConfiguration : IGitHubUsageConfiguration
1111
{
12-
private readonly Dictionary<string, NuGetPackageGitHubInformation> _nuGetPackagesGitHubDependencies;
12+
private readonly IReadOnlyDictionary<string, NuGetPackageGitHubInformation> _nuGetPackagesGitHubDependencies;
1313

14-
public GitHubUsageConfiguration(IReadOnlyList<RepositoryInformation> repositories)
14+
public GitHubUsageConfiguration(IReadOnlyCollection<RepositoryInformation> repositories)
1515
{
1616
if (repositories == null)
1717
{
@@ -36,7 +36,7 @@ public NuGetPackageGitHubInformation GetPackageInformation(string packageId)
3636
return NuGetPackageGitHubInformation.Empty;
3737
}
3838

39-
private static Dictionary<string, NuGetPackageGitHubInformation> GetNuGetPackagesDependents(IReadOnlyList<RepositoryInformation> repositories)
39+
private static IReadOnlyDictionary<string, NuGetPackageGitHubInformation> GetNuGetPackagesDependents(IReadOnlyCollection<RepositoryInformation> repositories)
4040
{
4141
var dependentsPerPackage = new Dictionary<string, List<RepositoryInformation>>(StringComparer.InvariantCultureIgnoreCase);
4242
foreach (var repo in repositories)

src/NuGetGallery.Services/Storage/ContentObjectService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ await Refresh<SymbolsConfiguration>(ServicesConstants.ContentNames.SymbolsConfig
4949
await Refresh<TyposquattingConfiguration>(ServicesConstants.ContentNames.TyposquattingConfiguration) ??
5050
new TyposquattingConfiguration();
5151

52-
var reposCache = await Refresh<IReadOnlyList<RepositoryInformation>>(ServicesConstants.ContentNames.NuGetPackagesGitHubDependencies) ??
52+
var reposCache = await Refresh<IReadOnlyCollection<RepositoryInformation>>(ServicesConstants.ContentNames.NuGetPackagesGitHubDependencies) ??
5353
Array.Empty<RepositoryInformation>();
5454

5555
GitHubUsageConfiguration = new GitHubUsageConfiguration(reposCache);

0 commit comments

Comments
 (0)