< Summary

Information
Class: AsiBackbone.DependencyInjection.AsiBackboneServiceCollectionExtensions
Assembly: AsiBackbone.DependencyInjection
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.DependencyInjection/AsiBackboneServiceCollectionExtensions.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 35
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
AddAsiBackbone(...)100%11100%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.DependencyInjection/AsiBackboneServiceCollectionExtensions.cs

#LineLine coverage
 1using Microsoft.Extensions.DependencyInjection;
 2
 3namespace AsiBackbone.DependencyInjection;
 4
 5/// <summary>
 6/// Provides the explicit <c>AddAsiBackbone</c> dependency injection entry point.
 7/// </summary>
 8public static class AsiBackboneServiceCollectionExtensions
 9{
 10    /// <summary>
 11    /// Adds an explicit AsiBackbone builder facade for host-selected provider registrations.
 12    /// </summary>
 13    /// <param name="services">The service collection to configure.</param>
 14    /// <param name="configure">The callback that names the provider registrations the host wants.</param>
 15    /// <returns>The same service collection so calls can be chained.</returns>
 16    /// <exception cref="ArgumentNullException">
 17    /// Thrown when <paramref name="services" /> or <paramref name="configure" /> is <see langword="null" />.
 18    /// </exception>
 19    /// <remarks>
 20    /// This method does not register Core, persistence, endpoint governance, telemetry, signing, outbox, or local-devel
 21    /// Provider packages contribute their own <c>Use*</c> extension methods, and only those explicitly called by the ho
 22    /// </remarks>
 23    public static IServiceCollection AddAsiBackbone(
 24        this IServiceCollection services,
 25        Action<IAsiBackboneBuilder> configure)
 26    {
 827        ArgumentNullException.ThrowIfNull(services);
 828        ArgumentNullException.ThrowIfNull(configure);
 29
 830        var builder = new AsiBackboneBuilder(services);
 831        configure(builder);
 32
 833        return services;
 34    }
 35}