public static DotCoverAnalyseSettings SetTargetSettings(this DotCoverAnalyseSettings toolSettings, ToolSettings targetSettings) { return(toolSettings .SetTargetExecutable(targetSettings.ProcessToolPath) .SetTargetArguments(targetSettings.GetProcessArguments().RenderForExecution()) .SetTargetWorkingDirectory(targetSettings.ProcessWorkingDirectory)); }
public static void Convert(ToolSettings toolSettings, ProcessStartInfo startInfo) { startInfo.FileName = toolSettings.ProcessToolPath; ControlFlow.Assert(startInfo.FileName != null, "ToolPath was not set."); // Push the tool arguments. startInfo.Arguments = toolSettings.GetProcessArguments().RenderForExecution(); startInfo.WorkingDirectory = toolSettings.ProcessWorkingDirectory; ApplyEnvironmentVariables(toolSettings.ProcessEnvironmentVariables, startInfo); /* * if (!Path.IsPathRooted(toolPath) && !toolPath.Contains(Path.DirectorySeparatorChar)) * toolPath = ToolPathResolver.GetPathExecutable(toolPath); * * var toolPathOverride = GetToolPathOverride(toolPath); * if (!string.IsNullOrEmpty(toolPathOverride)) * { * arguments = $"{toolPath.DoubleQuoteIfNeeded()} {arguments}".TrimEnd(); * toolPath = toolPathOverride; * } */ ControlFlow.Assert(File.Exists(startInfo.FileName), $"ToolPath '{startInfo.FileName}' does not exist."); }
public static OpenCoverSettings SetTargetSettings(this OpenCoverSettings toolSettings, ToolSettings targetSettings) { return(toolSettings .SetTargetPath(targetSettings.ProcessToolPath) .SetTargetArguments(targetSettings.GetProcessArguments().RenderForExecution()) .SetTargetDirectory(targetSettings.ProcessWorkingDirectory)); }
public static CoverletSettings SetTargetSettings(this CoverletSettings toolSettings, ToolSettings targetSettings) { return(toolSettings .SetTarget(targetSettings.ProcessToolPath) .SetTargetArgs(targetSettings.GetProcessArguments().RenderForExecution())); }