Skip to content

Commit 72b6ce4

Browse files
author
Radislav Berkovich
committed
Merge remote-tracking branch 'upstream/latest' into octane-dev-latest
# Conflicts: # HpToolsLauncher/Launcher.cs # HpToolsLauncher/Runners/FileSystemTestsRunner.cs # HpToolsLauncher/Runners/MBTRunner.cs
2 parents 1d7a652 + 2234fca commit 72b6ce4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2968
-3150
lines changed

HpToolsLauncher/ConsoleQuickEdit.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
*/
2828

2929
using System;
30-
using System.Collections.Generic;
31-
using System.Linq;
32-
using System.Text;
3330
using System.Runtime.InteropServices;
3431

3532
namespace HpToolsLauncher
@@ -51,8 +48,8 @@ public class ConsoleQuickEdit
5148
static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);
5249

5350
private static bool SetNewConsoleMode(IntPtr consoleHandle, uint consoleMode)
54-
{
55-
// set the new mode
51+
{
52+
// set the new mode
5653
if (!SetConsoleMode(consoleHandle, consoleMode))
5754
{
5855
// ERROR: Unable to set console mode

HpToolsLauncher/ElevatedProcess.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727
*/
2828

2929
using System;
30-
using System.Collections.Generic;
3130
using System.Diagnostics;
3231
using System.Linq;
3332
using System.Runtime.InteropServices;
34-
using System.Text;
3533

3634
namespace HpToolsLauncher
3735
{
@@ -51,7 +49,7 @@ public class ElevatedProcess : IDisposable
5149
private const uint STILL_ACTIVE = 259;
5250
private const uint INFINITE = 0xFFFFFFFF;
5351

54-
public ElevatedProcess(string path,string arguments,string workDirectory)
52+
public ElevatedProcess(string path, string arguments, string workDirectory)
5553
{
5654
_path = path;
5755
_arguments = arguments;
@@ -105,14 +103,15 @@ public void StartElevated()
105103
{
106104
Process process = null;
107105
try
108-
{
109-
process = Process.GetProcessesByName("explorer").FirstOrDefault();
110-
}catch(InvalidOperationException e)
106+
{
107+
process = Process.GetProcessesByName("explorer").FirstOrDefault();
108+
}
109+
catch (InvalidOperationException e)
111110
{
112111
throw new ElevatedProcessException("An error has occurred while trying to find the 'explorer' process: ", e);
113112
}
114113

115-
if(process == null)
114+
if (process == null)
116115
{
117116
throw new ElevatedProcessException("No process with the name 'explorer' found!");
118117
}

0 commit comments

Comments
 (0)