using Microsoft.AspNetCore.Builder;

namespace Hua.Todo.Application.DynamicApi;

/// <summary>
/// Dynamic API 中间件扩展方法。
/// </summary>
public static class DynamicApiExtensions
{
    /// <summary>
    /// 注册 Dynamic API 中间件。
    /// </summary>
    /// <param name="builder">应用构建器。</param>
    /// <returns>应用构建器。</returns>
    public static IApplicationBuilder UseDynamicApi(this IApplicationBuilder builder)
    {
        return builder.UseMiddleware<DynamicApiMiddleware>();
    }
}
