Initial commit: SWP.Core enterprise framework with multi-tenant architecture, configuration management, security, telemetry and comprehensive test suite
This commit is contained in:
commit
5275a75502
87 changed files with 6140 additions and 0 deletions
31
Core/ModuleRegistry/SeqLoggingModule.cs
Normal file
31
Core/ModuleRegistry/SeqLoggingModule.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Autofac;
|
||||
using SWP.Core.SeqLogging;
|
||||
|
||||
namespace SWP.Core.ModuleRegistry
|
||||
{
|
||||
public class SeqLoggingModule : Module
|
||||
{
|
||||
public required SeqConfiguration SeqConfiguration { get; set; }
|
||||
|
||||
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.RegisterGeneric(typeof(SeqLogger<>));
|
||||
|
||||
builder.RegisterInstance(SeqConfiguration);
|
||||
|
||||
builder.RegisterType<SeqHttpClient>()
|
||||
.As<SeqHttpClient>()
|
||||
.SingleInstance();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue