using Microsoft.Extensions.DependencyInjection;
using TakeoutSaaS.Application.Messaging.Abstractions;
using TakeoutSaaS.Application.Messaging.Services;

namespace TakeoutSaaS.Application.Messaging.Extensions;

/// <summary>
/// 消息模块应用层注册。
/// </summary>
public static class MessagingServiceCollectionExtensions
{
    /// <summary>
    /// 注册事件发布器。
    /// </summary>
    public static IServiceCollection AddMessagingApplication(this IServiceCollection services)
    {
        services.AddScoped<IEventPublisher, EventPublisher>();
        return services;
    }
}
