17 lines
541 B
C#
17 lines
541 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Serilog.Sinks.LogView.Core.Logging;
|
|
using LogDataStore = LogViewer.Avalonia.Logging.LogDataStore;
|
|
|
|
namespace LogViewer.Avalonia.Extensions;
|
|
|
|
public static class ServicesExtension
|
|
{
|
|
public static HostApplicationBuilder AddLogViewer(this HostApplicationBuilder builder)
|
|
{
|
|
builder.Services.AddSingleton<ILogDataStore, LogDataStore>();
|
|
builder.Services.AddSingleton<LogViewerControlViewModel>();
|
|
|
|
return builder;
|
|
}
|
|
} |