Skip to content

Commit f7e5fe7

Browse files
committed
C#: Inline some calls.
1 parent 611cf23 commit f7e5fe7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,9 @@ private IEnumerable<string> GetFeeds(Func<IList<string>> getNugetFeeds)
623623

624624
private (HashSet<string> explicitFeeds, HashSet<string> allFeeds) GetAllFeeds()
625625
{
626-
IList<string> GetNugetFeeds(string nugetConfig) => dotnet.GetNugetFeeds(nugetConfig);
627-
628-
IList<string> GetNugetFeedsFromFolder(string folderPath) => dotnet.GetNugetFeedsFromFolder(folderPath);
629-
630626
var nugetConfigs = fileProvider.NugetConfigs;
631627
var explicitFeeds = nugetConfigs
632-
.SelectMany(config => GetFeeds(() => GetNugetFeeds(config)))
628+
.SelectMany(config => GetFeeds(() => dotnet.GetNugetFeeds(config)))
633629
.ToHashSet();
634630

635631
if (explicitFeeds.Count > 0)
@@ -657,7 +653,7 @@ private IEnumerable<string> GetFeeds(Func<IList<string>> getNugetFeeds)
657653
return null;
658654
})
659655
.Where(folder => folder != null)
660-
.SelectMany(folder => GetFeeds(() => GetNugetFeedsFromFolder(folder!)))
656+
.SelectMany(folder => GetFeeds(() => dotnet.GetNugetFeedsFromFolder(folder!)))
661657
.ToHashSet();
662658

663659
logger.LogInfo($"Found {allFeeds.Count} Nuget feeds (with inherited ones) in nuget.config files: {string.Join(", ", allFeeds.OrderBy(f => f))}");

0 commit comments

Comments
 (0)