< Summary

Information
Class: FLP.Application.Configurations.ApplicationConfigurationExtension
Assembly: FLP.Application
File(s): /home/runner/work/FLP.AzureFunctions/FLP.AzureFunctions/FLP.Application/Configurations/ApplicationConfigurationExtension.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 25
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddApplicationServices(...)100%210%

File(s)

/home/runner/work/FLP.AzureFunctions/FLP.AzureFunctions/FLP.Application/Configurations/ApplicationConfigurationExtension.cs

#LineLine coverage
 1using FLP.Application.Handlers.Exceptions;
 2using MediatR.Pipeline;
 3using Microsoft.Extensions.DependencyInjection;
 4
 5namespace FLP.Application.Configurations;
 6
 7public static class ApplicationConfigurationExtension
 8{
 9    /// <summary>
 10    /// Configures the application services for the application.
 11    /// </summary>
 12    /// <param name="services">The service collection to configure.</param>
 13    public static void AddApplicationServices(this IServiceCollection services)
 014    {
 15        // Register application services here
 16        // Example: services.AddScoped<IMyService, MyService>();
 17        // Add other application-specific configurations as needed
 18        //services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(ApplicationConfigurationExtension).Assembly
 019        services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining<ApplicationConfiguration>());
 020        services.AddTransient(typeof(IRequestExceptionHandler<,,>), typeof(GlobalRequestExceptionHandler<,,>));
 21
 022        services.AddAutoMapper(typeof(ApplicationConfiguration).Assembly);
 23
 024    }
 25}