Skip to content

Commit 1fd85f4

Browse files
committed
C#: Rename DotNet to DotNetCliWrapper.
1 parent 82e56e6 commit 1fd85f4

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public sealed class DependencyManager : IDisposable
2727
private int conflictedReferences = 0;
2828
private readonly IDependencyOptions options;
2929
private readonly DirectoryInfo sourceDir;
30-
private readonly DotNet dotnet;
30+
private readonly DotNetCliWrapper dotnet;
3131
private readonly FileContent fileContent;
3232
private readonly TemporaryDirectory packageDirectory;
3333
private readonly TemporaryDirectory tempWorkingDirectory;
@@ -47,7 +47,7 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
4747

4848
try
4949
{
50-
this.dotnet = new DotNet(options, progressMonitor);
50+
this.dotnet = new DotNetCliWrapper(options, progressMonitor);
5151
}
5252
catch
5353
{

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs renamed to csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
99
/// <summary>
1010
/// Utilities to run the "dotnet" command.
1111
/// </summary>
12-
internal partial class DotNet : IDotNet
12+
internal partial class DotNetCliWrapper : IDotNet
1313
{
1414
private readonly IDotNetCliInvoker dotnet;
1515
private readonly ProgressMonitor progressMonitor;
1616

17-
internal DotNet(IDotNetCliInvoker dotnet, ProgressMonitor progressMonitor)
17+
internal DotNetCliWrapper(IDotNetCliInvoker dotnet, ProgressMonitor progressMonitor)
1818
{
1919
this.progressMonitor = progressMonitor;
2020
this.dotnet = dotnet;
2121
Info();
2222
}
2323

24-
public DotNet(IDependencyOptions options, ProgressMonitor progressMonitor) : this(new DotNetCliInvoker(progressMonitor, Path.Combine(options.DotNetPath ?? string.Empty, "dotnet")), progressMonitor) { }
24+
public DotNetCliWrapper(IDependencyOptions options, ProgressMonitor progressMonitor) : this(new DotNetCliInvoker(progressMonitor, Path.Combine(options.DotNetPath ?? string.Empty, "dotnet")), progressMonitor) { }
2525

2626

2727
private void Info()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ internal class Razor
1010
{
1111
private readonly DotnetVersion sdk;
1212
private readonly ProgressMonitor progressMonitor;
13-
private readonly DotNet dotNet;
13+
private readonly DotNetCliWrapper dotNet;
1414
private readonly string sourceGeneratorFolder;
1515
private readonly string cscPath;
1616

17-
public Razor(DotnetVersion sdk, DotNet dotNet, ProgressMonitor progressMonitor)
17+
public Razor(DotnetVersion sdk, DotNetCliWrapper dotNet, ProgressMonitor progressMonitor)
1818
{
1919
this.sdk = sdk;
2020
this.progressMonitor = progressMonitor;

csharp/extractor/Semmle.Extraction.Tests/DotNet.cs renamed to csharp/extractor/Semmle.Extraction.Tests/DotNetCliWrapper.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ public bool RunCommand(string args, out IList<string> output)
3535
public string GetLastArgs() => lastArgs;
3636
}
3737

38-
public class DotNetTests
38+
public class DotNetCliWrapperTests
3939
{
40-
4140
private static IDotNet MakeDotnet(IDotNetCliInvoker dotnetCliInvoker) =>
42-
new DotNet(dotnetCliInvoker, new ProgressMonitor(new LoggerStub()));
41+
new DotNetCliWrapper(dotnetCliInvoker, new ProgressMonitor(new LoggerStub()));
4342

4443
private static IList<string> MakeDotnetRestoreOutput() =>
4544
new List<string> {

0 commit comments

Comments
 (0)