Skip to content

Commit 958f01a

Browse files
committed
C#: Rename ExtraArgs to RestoreSources.
1 parent dc13650 commit 958f01a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ private string GetRestoreArgs(RestoreSettings restoreSettings)
9595
args += " /p:EnableWindowsTargeting=true";
9696
}
9797

98-
if (restoreSettings.ExtraArgs is not null)
98+
if (restoreSettings.RestoreSources is not null)
9999
{
100-
args += $" {restoreSettings.ExtraArgs}";
100+
args += $" {restoreSettings.RestoreSources}";
101101
}
102102

103103
return args;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public interface IDotNet
1717
IList<string> GetNugetFeedsFromFolder(string folderPath);
1818
}
1919

20-
public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? ExtraArgs = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);
20+
public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? RestoreSources = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);
2121

2222
public partial record class RestoreResult(bool Success, IList<string> Output)
2323
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private IEnumerable<string> RestoreSolutions(string? explicitRestoreSources, out
302302
var projects = fileProvider.Solutions.SelectMany(solution =>
303303
{
304304
logger.LogInfo($"Restoring solution {solution}...");
305-
var res = dotnet.Restore(new(solution, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, ExtraArgs: explicitRestoreSources, TargetWindows: isWindows));
305+
var res = dotnet.Restore(new(solution, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, RestoreSources: explicitRestoreSources, TargetWindows: isWindows));
306306
if (res.Success)
307307
{
308308
successCount++;
@@ -357,7 +357,7 @@ private void RestoreProjects(IEnumerable<string> projects, string? explicitResto
357357
foreach (var project in projectGroup)
358358
{
359359
logger.LogInfo($"Restoring project {project}...");
360-
var res = dotnet.Restore(new(project, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, ExtraArgs: explicitRestoreSources, TargetWindows: isWindows));
360+
var res = dotnet.Restore(new(project, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, RestoreSources: explicitRestoreSources, TargetWindows: isWindows));
361361
assets.AddDependenciesRange(res.AssetsFilePaths);
362362
lock (sync)
363363
{

0 commit comments

Comments
 (0)