Focus next/previous input element with Tab
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Serilog.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
@@ -6,6 +7,13 @@ namespace FileTime.ConsoleUI.App.Services;
|
||||
|
||||
public class CustomLoggerSink : ILogEventSink
|
||||
{
|
||||
private readonly Lazy<IDialogService> _dialogService;
|
||||
|
||||
public CustomLoggerSink(IServiceProvider serviceProvider)
|
||||
{
|
||||
_dialogService = new Lazy<IDialogService>(() => serviceProvider.GetRequiredService<IDialogService>());
|
||||
}
|
||||
|
||||
public void Emit(LogEvent logEvent)
|
||||
{
|
||||
if (logEvent.Level >= LogEventLevel.Error)
|
||||
@@ -14,6 +22,7 @@ public class CustomLoggerSink : ILogEventSink
|
||||
if (logEvent.Exception is not null)
|
||||
message += $" {logEvent.Exception.Message}";
|
||||
Debug.WriteLine(message);
|
||||
_dialogService.Value.ShowToastMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user