@@ -66,10 +66,10 @@ namespace Microsoft.NodejsTools
6666 internal sealed partial class NodejsPackage : CommonPackage
6767 {
6868 internal const string NodeExpressionEvaluatorGuid = "{F16F2A71-1C45-4BAB-BECE-09D28CFDE3E6}" ;
69- private IContentType _contentType ;
69+ private IContentType contentType ;
7070 internal static NodejsPackage Instance ;
7171 internal HashSet < ITextBuffer > ChangedBuffers = new HashSet < ITextBuffer > ( ) ;
72- private NodejsToolsLogger _logger ;
72+
7373 // Hold references for the subscribed events. Otherwise the callbacks will be garbage collected
7474 // after the initialization
7575 private List < EnvDTE . CommandEvents > _subscribedCommandEvents = new List < EnvDTE . CommandEvents > ( ) ;
@@ -136,8 +136,6 @@ protected override void Initialize()
136136
137137 MakeDebuggerContextAvailable ( ) ;
138138
139- InitializeLogging ( ) ;
140-
141139 InitializeTelemetry ( ) ;
142140
143141 // The variable is inherited by child processes backing Test Explorer, and is used in
@@ -177,11 +175,6 @@ private void SubscribeToVsCommandEvents(
177175 this . _subscribedCommandEvents . Add ( targetEvent ) ;
178176 }
179177
180- private void InitializeLogging ( )
181- {
182- this . _logger = new NodejsToolsLogger ( this . ComponentModel . GetExtensions < INodejsToolsLogger > ( ) . ToArray ( ) ) ;
183- }
184-
185178 private void InitializeTelemetry ( )
186179 {
187180 // Fetch the session synchronously on the UI thread; if this doesn't happen before we try using this on
@@ -191,8 +184,6 @@ private void InitializeTelemetry()
191184
192185 public new IComponentModel ComponentModel => this . GetComponentModel ( ) ;
193186
194- internal NodejsToolsLogger Logger => this . _logger ;
195-
196187 /// <summary>
197188 /// Makes the debugger context available - this enables our debugger when we're installed into
198189 /// a SKU which doesn't support every installed debugger.
@@ -201,8 +192,8 @@ private void MakeDebuggerContextAvailable()
201192 {
202193 var monitorSelection = ( IVsMonitorSelection ) GetService ( typeof ( SVsShellMonitorSelection ) ) ;
203194 var debugEngineGuid = AD7Engine . DebugEngineGuid ;
204- uint contextCookie ;
205- if ( ErrorHandler . Succeeded ( monitorSelection . GetCmdUIContextCookie ( ref debugEngineGuid , out contextCookie ) ) )
195+
196+ if ( ErrorHandler . Succeeded ( monitorSelection . GetCmdUIContextCookie ( ref debugEngineGuid , out var contextCookie ) ) )
206197 {
207198 ErrorHandler . ThrowOnFailure ( monitorSelection . SetCmdUIContext ( contextCookie , 1 ) ) ;
208199 }
@@ -262,11 +253,11 @@ private IContentType ReplContentType
262253 {
263254 get
264255 {
265- if ( this . _contentType == null )
256+ if ( this . contentType == null )
266257 {
267- this . _contentType = this . ComponentModel . GetService < IContentTypeRegistryService > ( ) . GetContentType ( NodejsConstants . TypeScript ) ;
258+ this . contentType = this . ComponentModel . GetService < IContentTypeRegistryService > ( ) . GetContentType ( NodejsConstants . TypeScript ) ;
268259 }
269- return this . _contentType ;
260+ return this . contentType ;
270261 }
271262 }
272263
0 commit comments