Add annotationResult and put them into json

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-07-16 14:06:05 +03:00
parent ea8d0e686a
commit 71006a2462
16 changed files with 445 additions and 252 deletions
+16 -2
View File
@@ -4,19 +4,33 @@ using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Azaion.Annotator.DTO;
using Azaion.Annotator.Extensions;
using LibVLCSharp.Shared;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using ILogger = Microsoft.Extensions.Logging.ILogger;
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
namespace Azaion.Annotator;
public partial class App : Application
{
private readonly ServiceProvider _serviceProvider;
private IMediator _mediator;
private readonly IMediator _mediator;
public App()
{
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.MinimumLevel.Warning()
.WriteTo.Console()
.WriteTo.File(
path: "Logs/log.txt",
rollingInterval: RollingInterval.Day)
.CreateLogger();
var services = new ServiceCollection();
services.AddSingleton<MainWindow>();
services.AddSingleton<HelpWindow>();
@@ -37,7 +51,7 @@ public partial class App : Application
private void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
File.AppendAllText("logs.txt", e.Exception.Message);
Log.Logger.Error(e.Exception, e.Exception.Message);
e.Handled = true;
}