using Autofac;
using Microsoft.Extensions.Hosting;
using PlanTempus.Core.Telemetry;

namespace PlanTempus.Components.Outbox;

public class OutboxListenerModule : Module
{
	protected override void Load(ContainerBuilder builder)
	{
		builder.RegisterType<NotificationChannel>()
			.As<IMessageChannel<string>>()
			.SingleInstance();

		builder.RegisterType<OutboxListener>()
			.As<IHostedService>()
			.SingleInstance();
	}
}
