提交 641e07aa 编写于 作者: A Ashley Hauck

Clarify that it's a native invocation, not necessarily native executable

上级 8c49d85e
......@@ -12,23 +12,24 @@ internal sealed class DotnetHost
/// <summary>
/// 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).
/// </summary>
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)
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册