PlanTempusApp/Core/ModuleRegistry/SeqLoggingModule.cs

28 lines
681 B
C#

using Autofac;
using Core.Logging;
using Core.Telemetry;
namespace Core.ModuleRegistry
{
public class SeqLoggingModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<MessageChannel>()
.As<IMessageChannel<Microsoft.ApplicationInsights.Channel.ITelemetry>>()
.SingleInstance();
builder.RegisterType<SeqBackgroundService>()
.As<Microsoft.Extensions.Hosting.IHostedService>()
.SingleInstance();
builder.RegisterType<SeqHttpClient>()
.As<SeqHttpClient>()
.SingleInstance();
}
}
}