1- using Microsoft . TeamFoundation . Git . Controls . Extensibility ;
2- using System ;
1+ using System ;
2+ using System . Collections . Generic ;
33using System . ComponentModel . Composition ;
44using System . Globalization ;
55using System . Linq ;
6+ using System . Windows . Input ;
67using GitHub . Extensions ;
7- using Microsoft . Win32 ;
8- using Microsoft . VisualStudio . TeamFoundation . Git . Extensibility ;
8+ using GitHub . Models ;
99using GitHub . VisualStudio ;
1010using Microsoft . TeamFoundation . Controls ;
11+ using Microsoft . TeamFoundation . Git . Controls . Extensibility ;
1112using Microsoft . VisualStudio ;
1213using Microsoft . VisualStudio . Shell . Interop ;
13- using System . Collections . Generic ;
14- using GitHub . Models ;
15- using System . Windows . Input ;
14+ using Microsoft . VisualStudio . TeamFoundation . Git . Extensibility ;
15+ using Microsoft . Win32 ;
1616
1717namespace GitHub . Services
1818{
@@ -181,41 +181,36 @@ public string SetDefaultProjectPath(string path)
181181 public void ShowMessage ( string message )
182182 {
183183 var manager = serviceProvider . TryGetService < ITeamExplorer > ( ) as ITeamExplorerNotificationManager ;
184- if ( manager != null )
185- manager . ShowNotification ( message , NotificationType . Information , NotificationFlags . None , null , default ( Guid ) ) ;
184+ manager ? . ShowNotification ( message , NotificationType . Information , NotificationFlags . None , null , default ( Guid ) ) ;
186185 }
187186
188187 public void ShowMessage ( string message , ICommand command )
189188 {
190189 var manager = serviceProvider . TryGetService < ITeamExplorer > ( ) as ITeamExplorerNotificationManager ;
191- if ( manager != null )
192- manager . ShowNotification ( message , NotificationType . Information , NotificationFlags . None , command , default ( Guid ) ) ;
190+ manager ? . ShowNotification ( message , NotificationType . Information , NotificationFlags . None , command , default ( Guid ) ) ;
193191 }
194192
195193 public void ShowWarning ( string message )
196194 {
197195 var manager = serviceProvider . TryGetService < ITeamExplorer > ( ) as ITeamExplorerNotificationManager ;
198- if ( manager != null )
199- manager . ShowNotification ( message , NotificationType . Warning , NotificationFlags . None , null , default ( Guid ) ) ;
196+ manager ? . ShowNotification ( message , NotificationType . Warning , NotificationFlags . None , null , default ( Guid ) ) ;
200197 }
201198
202199 public void ShowError ( string message )
203200 {
204201 var manager = serviceProvider . TryGetService < ITeamExplorer > ( ) as ITeamExplorerNotificationManager ;
205- if ( manager != null )
206- manager . ShowNotification ( message , NotificationType . Error , NotificationFlags . None , null , default ( Guid ) ) ;
202+ manager ? . ShowNotification ( message , NotificationType . Error , NotificationFlags . None , null , default ( Guid ) ) ;
207203 }
208204
209205 public void ClearNotifications ( )
210206 {
211207 var manager = serviceProvider . TryGetService < ITeamExplorer > ( ) as ITeamExplorerNotificationManager ;
212- if ( manager != null )
213- manager . ClearNotifications ( ) ;
214- }
208+ manager ? . ClearNotifications ( ) ;
209+ }
215210
216211 public void ActivityLogMessage ( string message )
217212 {
218- var log = VisualStudio . Services . GetActivityLog ( serviceProvider ) ;
213+ var log = serviceProvider . GetActivityLog ( ) ;
219214 if ( log != null )
220215 {
221216 if ( ! ErrorHandler . Succeeded ( log . LogEntry ( ( UInt32 ) __ACTIVITYLOG_ENTRYTYPE . ALE_INFORMATION ,
@@ -226,7 +221,7 @@ public void ActivityLogMessage(string message)
226221
227222 public void ActivityLogError ( string message )
228223 {
229- var log = VisualStudio . Services . GetActivityLog ( serviceProvider ) ;
224+ var log = serviceProvider . GetActivityLog ( ) ;
230225 if ( log != null )
231226 {
232227
@@ -238,7 +233,7 @@ public void ActivityLogError(string message)
238233
239234 public void ActivityLogWarning ( string message )
240235 {
241- var log = VisualStudio . Services . GetActivityLog ( serviceProvider ) ;
236+ var log = serviceProvider . GetActivityLog ( ) ;
242237 if ( log != null )
243238 {
244239 if ( ! ErrorHandler . Succeeded ( log . LogEntry ( ( UInt32 ) __ACTIVITYLOG_ENTRYTYPE . ALE_WARNING ,
0 commit comments