@@ -54,7 +54,7 @@ public void Format(LogEvent logEvent, TextWriter output)
5454 } ;
5555
5656 //var prefix = $"{timestamp} | {ctx,-67} | {levelText,-7} | "; // byebye 67 char SourceContext truncation, we have a new design now...
57- var prefix = $ "{ timestamp } | { ctx , - 35 } | { levelText , - 7 } | ";
57+ var prefix = $ "{ timestamp } | { ctx , - 35 } | { levelText , - 7 } | ";
5858
5959 // print message
6060 output . WriteLine ( prefix + RenderWithoutQuotes ( logEvent ) ) ;
@@ -318,8 +318,7 @@ protected override void OnExit(ExitEventArgs e)
318318 base . OnExit ( e ) ;
319319 }
320320
321- protected async void MainWindow_Closing ( object ? sender ,
322- CancelEventArgs e )
321+ protected async void MainWindow_Closing ( object ? sender , CancelEventArgs e )
323322 {
324323 if ( _allowClose )
325324 {
@@ -335,50 +334,38 @@ protected async void MainWindow_Closing(object? sender,
335334
336335 try
337336 {
338- _contentDialogService ??=
339- _host ! . Services . GetRequiredService < IContentDialogService > ( ) ;
337+ _contentDialogService ??= _host ! . Services . GetRequiredService < IContentDialogService > ( ) ;
340338
341339 var result = await _contentDialogService . ShowSimpleDialogAsync (
342340 new SimpleContentDialogCreateOptions
343341 {
344342 Title = Translations . Dialog_PendingChanges_Title ,
345343 Content = Translations . Dialog_PendingChanges_Content ,
346- CloseButtonText =
347- Translations . Dialog_PendingChanges_CloseButton ,
348- PrimaryButtonText =
349- Translations . Dialog_PendingChanges_PrimaryButton ,
350- SecondaryButtonText =
351- Translations . Dialog_PendingChanges_SecondaryButton
344+ CloseButtonText = Translations . Dialog_PendingChanges_CloseButton ,
345+ PrimaryButtonText = Translations . Dialog_PendingChanges_PrimaryButton ,
346+ SecondaryButtonText = Translations . Dialog_PendingChanges_SecondaryButton ,
352347 }
353348 ) ;
354349
355350 switch ( result )
356351 {
357352 case ContentDialogResult . Primary :
358- _logger . LogInformation (
359- "User chose to restart PC."
360- ) ;
353+ _logger . LogInformation ( "User chose to restart PC." ) ;
361354
362355 ShellService . CMD ( "shutdown /r /t 0" ) ;
363356 break ;
364357
365358 case ContentDialogResult . Secondary :
366- _logger . LogInformation (
367- "User chose to restart Explorer."
368- ) ;
359+ _logger . LogInformation ( "User chose to restart Explorer." ) ;
369360
370- ShellService . CMD (
371- "taskkill /f /im explorer.exe && start explorer.exe"
372- ) ;
361+ ShellService . CMD ( "taskkill /f /im explorer.exe && start explorer.exe" ) ;
373362
374363 _allowClose = true ;
375364 Current . Shutdown ( ) ;
376365 break ;
377366
378367 case ContentDialogResult . None :
379- _logger . LogInformation (
380- "User chose to exit without applying changes."
381- ) ;
368+ _logger . LogInformation ( "User chose to exit without applying changes." ) ;
382369
383370 _allowClose = true ;
384371 Current . Shutdown ( ) ;
@@ -387,10 +374,7 @@ protected async void MainWindow_Closing(object? sender,
387374 }
388375 catch ( Exception ex )
389376 {
390- _logger . LogError (
391- ex ,
392- "Failed to show pending changes dialog."
393- ) ;
377+ _logger . LogError ( ex , "Failed to show pending changes dialog." ) ;
394378
395379 _allowClose = true ;
396380 Current . Shutdown ( ) ;
0 commit comments