Files
Mccn/src/Common/Mccn.Common.Infrastructure/EventBus/EventBus.cs
2026-03-15 17:11:31 +01:00

14 lines
382 B
C#

using MassTransit;
using Mccn.Common.Application.EventBus;
namespace Mccn.Common.Infrastructure.EventBus;
internal sealed class EventBus(IBus bus) : IEventBus
{
public async Task PublishAsync<T>(T integrationEvent, CancellationToken cancellationToken = default)
where T : IIntegrationEvent
{
await bus.Publish(integrationEvent, cancellationToken);
}
}