Skip to content

Commit bfaefdf

Browse files
authored
Merge pull request #1981 from paulvanbrenk/preUnitTest
cleanup namespaces
2 parents 1a3e6ea + 98096c7 commit bfaefdf

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

Common/Product/SharedProject/ProcessOutput.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,10 @@ public ProcessPriorityClass PriorityClass
640640
/// <param name="line"></param>
641641
public void WriteInputLine(string line)
642642
{
643-
if (IsStarted && redirector != null && !redirector.CloseStandardInput())
643+
if (this.IsStarted && this.redirector != null && !this.redirector.CloseStandardInput())
644644
{
645-
Process.StandardInput.WriteLine(line);
646-
Process.StandardInput.Flush();
645+
this.Process.StandardInput.WriteLine(line);
646+
this.Process.StandardInput.Flush();
647647
}
648648
}
649649

@@ -824,11 +824,7 @@ private void OnExited(object sender, EventArgs e)
824824
}
825825
this.haveRaisedExitedEvent = true;
826826
FlushAndCloseOutput();
827-
var evt = Exited;
828-
if (evt != null)
829-
{
830-
evt(this, e);
831-
}
827+
Exited?.Invoke(this, e);
832828
}
833829

834830
/// <summary>

Nodejs/Product/TestAdapterImpl/ServiceProviderExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Globalization;
55
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
66

7-
namespace Microsoft.VisualStudioTools.TestAdapter
7+
namespace Microsoft.NodejsTools.TestAdapter
88
{
99
internal static class ServiceProviderExtensions
1010
{

Nodejs/Product/TestAdapterImpl/TestFileAddRemoveListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Microsoft.VisualStudio.Shell.Interop;
77
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
88

9-
namespace Microsoft.VisualStudioTools.TestAdapter
9+
namespace Microsoft.NodejsTools.TestAdapter
1010
{
1111
internal sealed class TestFileChangedEventArgs : EventArgs
1212
{
@@ -24,7 +24,7 @@ public TestFileChangedEventArgs(string file, WatcherChangeTypes reason, IVsProje
2424

2525
internal sealed class TestFileAddRemoveListener : IVsTrackProjectDocumentsEvents2, IDisposable
2626
{
27-
private IVsTrackProjectDocuments2 _projectDocTracker;
27+
private readonly IVsTrackProjectDocuments2 _projectDocTracker;
2828
private uint _cookie = VSConstants.VSCOOKIE_NIL;
2929
private Guid _testProjectGuid;
3030

Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Microsoft.VisualStudio.Shell.Interop;
99
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
1010

11-
namespace Microsoft.VisualStudioTools.TestAdapter
11+
namespace Microsoft.NodejsTools.TestAdapter
1212
{
1313
// TODO: consider replacing this with Microsoft.VisualStudioTools.Project.FileChangeManager. (When we have an assembly we can use to share code)
1414

Nodejs/Product/TestAdapterImpl/TestMethodResolver.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.VisualStudio.Shell;
88
using Microsoft.VisualStudio.Shell.Interop;
99
using Microsoft.VisualStudio.TestWindow.Extensibility;
10-
using Microsoft.VisualStudioTools.TestAdapter;
1110
using MSBuild = Microsoft.Build.Evaluation;
1211

1312
namespace Microsoft.NodejsTools.TestAdapter

Nodejs/Product/TestAdapterImpl/VsProjectExtensions.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Diagnostics;
6-
using Microsoft.NodejsTools;
76
using Microsoft.VisualStudio;
8-
using Microsoft.VisualStudio.Shell;
97
using Microsoft.VisualStudio.Shell.Flavor;
108
using Microsoft.VisualStudio.Shell.Interop;
119
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
1210

13-
namespace Microsoft.VisualStudioTools.TestAdapter
11+
namespace Microsoft.NodejsTools.TestAdapter
1412
{
1513
internal static class VSProjectExtensions
1614
{
@@ -100,12 +98,7 @@ out var extObject
10098
try
10199
{
102100
var projHome = props.Item("ProjectHome");
103-
if (projHome == null)
104-
{
105-
return null;
106-
}
107-
108-
return projHome.Value as string;
101+
return projHome == null ? null : projHome.Value as string;
109102
}
110103
catch (ArgumentException)
111104
{

0 commit comments

Comments
 (0)