Working on BackgroundService
This commit is contained in:
parent
9f4996bc8f
commit
ad4ed12f00
12 changed files with 368 additions and 317 deletions
|
|
@ -4,25 +4,29 @@ using PlanTempus.Core.Telemetry;
|
|||
|
||||
namespace PlanTempus.Core.ModuleRegistry
|
||||
{
|
||||
public class SeqLoggingModule : Module
|
||||
{
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
public class SeqLoggingModule : Module
|
||||
{
|
||||
public required SeqConfiguration SeqConfiguration { get; set; }
|
||||
|
||||
builder.RegisterType<MessageChannel>()
|
||||
.As<IMessageChannel<Microsoft.ApplicationInsights.Channel.ITelemetry>>()
|
||||
.SingleInstance();
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
|
||||
builder.RegisterType<SeqBackgroundService>()
|
||||
.As<Microsoft.Extensions.Hosting.IHostedService>()
|
||||
.SingleInstance();
|
||||
builder.RegisterType<MessageChannel>()
|
||||
.As<IMessageChannel<Microsoft.ApplicationInsights.Channel.ITelemetry>>()
|
||||
.SingleInstance();
|
||||
|
||||
builder.RegisterType<SeqHttpClient>()
|
||||
.As<SeqHttpClient>()
|
||||
.SingleInstance();
|
||||
builder.RegisterType<SeqBackgroundService>()
|
||||
.As<Microsoft.Extensions.Hosting.IHostedService>()
|
||||
.SingleInstance();
|
||||
|
||||
builder.RegisterGeneric(typeof(SeqLogger<>));
|
||||
|
||||
builder.RegisterInstance(SeqConfiguration);
|
||||
|
||||
}
|
||||
}
|
||||
builder.RegisterType<SeqHttpClient>()
|
||||
.As<SeqHttpClient>()
|
||||
.SingleInstance();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue