< Summary - ZhEaIsNsAaBn.Libraries coverage (affected: 23 packages)

Information
Class: Microsoft.Extensions.DependencyInjection.APIExceptionHandlersRegistration
Assembly: ZhEaIsNsAaBn.Utilities.APIExceptionHandlers
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/UtilitiesPackages/ZhEaIsNsAaBn.Utilities.APIExceptionHandlers/APIExceptionHandlersRegistration.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 22
Line coverage: 100%
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
AddCustomExceptionHandlers(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/UtilitiesPackages/ZhEaIsNsAaBn.Utilities.APIExceptionHandlers/APIExceptionHandlersRegistration.cs

#LineLine coverage
 1using ZhEaIsNsAaBn.Utilities.APIExceptionHandlers;
 2
 3// ReSharper disable once CheckNamespace
 4namespace Microsoft.Extensions.DependencyInjection;
 5
 6/// <summary>Registers the API exception handlers.</summary>
 7public static class APIExceptionHandlersRegistration
 8{
 9    /// <summary>
 10    /// Starts a fluent registration of the exception handlers; <b>call <see cref="IExceptionHandlersBuilder.Build"/> at
 11    /// nothing is registered before it. <c>Build()</c> adds, in order, the JSON, validation, business, external-service
 12    /// handlers recorded with <c>With*</c>, and the fallback last, plus problem details written as the <see cref="BaseR
 13    /// (status-code pages included). Call <c>app.UseExceptionHandler()</c> in the pipeline. Statuses come from
 14    /// <see cref="APIResponsesSettings"/>: configure them once with <c>services.AddAPIResponses( s =&gt; … )</c> (befor
 15    /// returned errors and exceptions map the same way.
 16    /// </summary>
 17    /// <param name="services">The service collection.</param>
 18    /// <returns>The builder.</returns>
 19    /// <exception cref="ArgumentNullException"><paramref name="services"/> is <see langword="null"/>.</exception>
 20    /// <example><code>services.AddCustomExceptionHandlers().WithDatabaseHandler().WithHandler&lt;MyHandler&gt;().Build(
 11621    public static IExceptionHandlersBuilder AddCustomExceptionHandlers( this IServiceCollection services ) => new Except
 22}