From 641e07aab8d1e495d9e8ef807548f9e1051a0ec8 Mon Sep 17 00:00:00 2001 From: Ashley Hauck Date: Mon, 9 Oct 2017 08:15:38 -0700 Subject: [PATCH] Clarify that it's a native invocation, not necessarily native executable --- src/Compilers/Core/MSBuildTask/DotnetHost.cs | 17 +++++++++-------- .../Core/MSBuildTask/InteractiveCompiler.cs | 4 ++-- .../Core/MSBuildTask/ManagedCompiler.cs | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Compilers/Core/MSBuildTask/DotnetHost.cs b/src/Compilers/Core/MSBuildTask/DotnetHost.cs index 5dd76c20b9c..ae87aeb657f 100644 --- a/src/Compilers/Core/MSBuildTask/DotnetHost.cs +++ b/src/Compilers/Core/MSBuildTask/DotnetHost.cs @@ -12,23 +12,24 @@ internal sealed class DotnetHost /// /// True if this tool is a managed executable, and will be invoked with `dotnet`. - /// False if this executable is being invoked directly. + /// False if this executable is being invoked directly + /// (it may still be a managed executable, but will be invoked directly). /// - public bool IsManagedTool { get; } + public bool IsManagedInvocation { get; } - private DotnetHost(string pathToToolOpt, string commandLineArgs, bool isManagedTool) + private DotnetHost(string pathToToolOpt, string commandLineArgs, bool isManagedInvocation) { PathToToolOpt = pathToToolOpt; CommandLineArgs = commandLineArgs; - IsManagedTool = isManagedTool; + IsManagedInvocation = isManagedInvocation; } - public static DotnetHost CreateNativeToolInvocation(string pathToTool, string commandLineArgs) + public static DotnetHost CreateNativeInvocationTool(string pathToTool, string commandLineArgs) { - return new DotnetHost(pathToTool, commandLineArgs, isManagedTool: false); + return new DotnetHost(pathToTool, commandLineArgs, isManagedInvocation: false); } - public static DotnetHost CreateManagedToolInvocation(string toolName, string commandLineArgs) + public static DotnetHost CreateManagedInvocationTool(string toolName, string commandLineArgs) { var pathToToolOpt = Utilities.GenerateFullPathToTool(toolName); // Desktop executes tool directly, only prepend if we're on CLI @@ -38,7 +39,7 @@ public static DotnetHost CreateManagedToolInvocation(string toolName, string com pathToToolOpt = pathToDotnet; } - return new DotnetHost(pathToToolOpt, commandLineArgs, isManagedTool: true); + return new DotnetHost(pathToToolOpt, commandLineArgs, isManagedInvocation: true); } private static bool IsCliHost(out string pathToDotnet) diff --git a/src/Compilers/Core/MSBuildTask/InteractiveCompiler.cs b/src/Compilers/Core/MSBuildTask/InteractiveCompiler.cs index f51bc2f7304..4ee67d74e35 100644 --- a/src/Compilers/Core/MSBuildTask/InteractiveCompiler.cs +++ b/src/Compilers/Core/MSBuildTask/InteractiveCompiler.cs @@ -196,13 +196,13 @@ private DotnetHost DotnetHostInfo // explicitly overriden - so use it as a native invocation. if (string.IsNullOrEmpty(ToolPath) || ToolExe == ToolName) { - _dotnetHostInfo = DotnetHost.CreateManagedToolInvocation(ToolName, commandLine); + _dotnetHostInfo = DotnetHost.CreateManagedInvocationTool(ToolName, commandLine); } else { // Explicitly provided ToolPath or ToolExe, don't try to // figure anything out - _dotnetHostInfo = DotnetHost.CreateNativeToolInvocation(Path.Combine(ToolPath, ToolExe), commandLine); + _dotnetHostInfo = DotnetHost.CreateNativeInvocationTool(Path.Combine(ToolPath, ToolExe), commandLine); } } return _dotnetHostInfo; diff --git a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs index 6d0a2ce5875..6fff54746b0 100644 --- a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs +++ b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs @@ -425,13 +425,13 @@ private DotnetHost DotnetHostInfo // explicitly overriden - so use it as a native invocation. if (string.IsNullOrEmpty(ToolPath) || ToolExe == ToolName) { - _dotnetHostInfo = DotnetHost.CreateManagedToolInvocation(ToolName, commandLine); + _dotnetHostInfo = DotnetHost.CreateManagedInvocationTool(ToolName, commandLine); } else { // Explicitly provided ToolPath or ToolExe, don't try to // figure anything out - _dotnetHostInfo = DotnetHost.CreateNativeToolInvocation(Path.Combine(ToolPath, ToolExe), commandLine); + _dotnetHostInfo = DotnetHost.CreateNativeInvocationTool(Path.Combine(ToolPath, ToolExe), commandLine); } } return _dotnetHostInfo; -- GitLab