Skip to content

Commit f5b13cd

Browse files
committed
rename variable
1 parent fe0e258 commit f5b13cd

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ internal class NuGetPackageDownloader : INuGetPackageDownloader
3939
private readonly IFirstPartyNuGetPackageSigningVerifier _firstPartyNuGetPackageSigningVerifier;
4040
private bool _validationMessagesDisplayed = false;
4141
private IDictionary<PackageSource, SourceRepository> _sourceRepositories;
42-
private readonly bool _isNuGetTool;
42+
private readonly bool _shouldUsePackageSourceMapping;
4343

4444
private bool _verifySignatures;
4545
private VerbosityOptions _verbosityOptions;
@@ -53,7 +53,7 @@ public NuGetPackageDownloader(
5353
RestoreActionConfig restoreActionConfig = null,
5454
Func<IEnumerable<Task>> timer = null,
5555
bool verifySignatures = false,
56-
bool isNuGetTool = false,
56+
bool shouldUsePackageSourceMapping = false,
5757
VerbosityOptions verbosityOptions = VerbosityOptions.normal)
5858
{
5959
_packageInstallDir = packageInstallDir;
@@ -76,7 +76,7 @@ public NuGetPackageDownloader(
7676

7777
DefaultCredentialServiceUtility.SetupDefaultCredentialService(new NuGetConsoleLogger(),
7878
!_restoreActionConfig.Interactive);
79-
_isNuGetTool = isNuGetTool;
79+
_shouldUsePackageSourceMapping = shouldUsePackageSourceMapping;
8080
_verbosityOptions = verbosityOptions;
8181
}
8282

@@ -330,7 +330,7 @@ private IEnumerable<PackageSource> LoadNuGetSources(PackageId packageId, Package
330330
packageSourceMapping ??= PackageSourceMapping.GetPackageSourceMapping(settings);
331331

332332
// filter package patterns if enabled
333-
if (_isNuGetTool && packageSourceMapping?.IsEnabled == true)
333+
if (_shouldUsePackageSourceMapping && packageSourceMapping?.IsEnabled == true)
334334
{
335335
IReadOnlyList<string> sources = packageSourceMapping.GetConfiguredPackageSources(packageId.ToString());
336336

src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
100100

101101
var toolDownloadDir = isGlobalTool ? _globalToolStageDir : _localToolDownloadDir;
102102
var assetFileDirectory = isGlobalTool ? _globalToolStageDir : _localToolAssetDir;
103-
var nugetPackageDownloader = new NuGetPackageDownloader.NuGetPackageDownloader(toolDownloadDir, verboseLogger: nugetLogger, isNuGetTool: true, verbosityOptions: verbosity);
103+
var nugetPackageDownloader = new NuGetPackageDownloader.NuGetPackageDownloader(toolDownloadDir, verboseLogger: nugetLogger, shouldUsePackageSourceMapping: true, verbosityOptions: verbosity);
104104

105105
var packageSourceLocation = new PackageSourceLocation(packageLocation.NugetConfig, packageLocation.RootConfigDirectory, null, packageLocation.AdditionalFeeds);
106106

@@ -401,7 +401,7 @@ public NuGetVersion GetNuGetVersion(
401401
var nugetPackageDownloader = new NuGetPackageDownloader.NuGetPackageDownloader(
402402
packageInstallDir: isGlobalTool ? _globalToolStageDir : _localToolDownloadDir,
403403
verboseLogger: nugetLogger,
404-
isNuGetTool: true,
404+
shouldUsePackageSourceMapping: true,
405405
verbosityOptions: verbosity);
406406

407407
var packageSourceLocation = new PackageSourceLocation(

src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public WorkloadCommandBase(
117117
Reporter,
118118
restoreActionConfig: RestoreActionConfiguration,
119119
verifySignatures: VerifySignatures,
120-
isNuGetTool: true);
120+
shouldUsePackageSourceMapping: true);
121121
}
122122

123123
/// <summary>

test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public NuGetPackageInstallerTests(ITestOutputHelper log) : base(log)
3838
restoreActionConfig: new RestoreActionConfig(NoCache: true), timer: () => ExponentialRetry.Timer(ExponentialRetry.TestingIntervals));
3939
_toolInstaller =
4040
new NuGetPackageDownloader(_tempDirectory, null, new MockFirstPartyNuGetPackageSigningVerifier(), _logger,
41-
restoreActionConfig: new RestoreActionConfig(NoCache: true), timer: () => ExponentialRetry.Timer(ExponentialRetry.TestingIntervals), isNuGetTool: true);
41+
restoreActionConfig: new RestoreActionConfig(NoCache: true), timer: () => ExponentialRetry.Timer(ExponentialRetry.TestingIntervals), shouldUsePackageSourceMapping: true);
4242
}
4343

4444
[Fact]

0 commit comments

Comments
 (0)