using Marathon.Application.UseCases;
using Microsoft.Extensions.DependencyInjection;
namespace Marathon.Application;
///
/// DI registration helpers for the Marathon.Application layer.
/// Call from the composition root (host or
/// InfrastructureModule).
///
public static class ApplicationModule
{
///
/// Registers all Application-layer use cases with Scoped lifetime.
/// Use cases are scoped so that each background-service cycle or UI request
/// gets a fresh unit-of-work from its own DI scope.
///
///
/// No is
/// required here — the Application layer has no direct configuration bindings.
/// Infrastructure and UI layers bind their own options against the shared
/// JSON sections.
///
public static IServiceCollection AddMarathonApplication(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
return services;
}
}