2026-04-05 10:13:12 +02:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2026-04-04 13:30:13 +02:00
|
|
|
using Microsoft.Extensions.Hosting;
|
2026-04-05 10:13:12 +02:00
|
|
|
using Serilog.Sinks.LogView.Core.Logging;
|
2026-04-04 13:30:13 +02:00
|
|
|
using LogDataStore = LogViewer.Avalonia.Logging.LogDataStore;
|
|
|
|
|
|
2026-04-05 10:13:12 +02:00
|
|
|
namespace LogViewer.Avalonia.Extensions;
|
2026-04-04 13:30:13 +02:00
|
|
|
|
|
|
|
|
public static class ServicesExtension
|
|
|
|
|
{
|
|
|
|
|
public static HostApplicationBuilder AddLogViewer(this HostApplicationBuilder builder)
|
|
|
|
|
{
|
|
|
|
|
builder.Services.AddSingleton<ILogDataStore, LogDataStore>();
|
|
|
|
|
builder.Services.AddSingleton<LogViewerControlViewModel>();
|
|
|
|
|
|
|
|
|
|
return builder;
|
|
|
|
|
}
|
|
|
|
|
}
|