< Summary

Information
Class: AsiBackbone.Signing.LocalDevelopment.LocalDevelopmentSigningBuilderExtensions
Assembly: AsiBackbone.Signing.LocalDevelopment
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Signing.LocalDevelopment/LocalDevelopmentSigningBuilderExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 39
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
UseLocalDevelopmentSigning(...)100%210%
UseLocalDevelopmentSigning(...)100%210%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Signing.LocalDevelopment/LocalDevelopmentSigningBuilderExtensions.cs

#LineLine coverage
 1using AsiBackbone.Core.Signing;
 2using AsiBackbone.DependencyInjection;
 3using Microsoft.Extensions.DependencyInjection;
 4
 5namespace AsiBackbone.Signing.LocalDevelopment;
 6
 7/// <summary>
 8/// Provides explicit builder facade extension methods for local-development signing.
 9/// </summary>
 10public static class LocalDevelopmentSigningBuilderExtensions
 11{
 12    /// <summary>
 13    /// Adds local-development signing and verification through the AsiBackbone builder facade using default options.
 14    /// </summary>
 15    public static IAsiBackboneBuilder UseLocalDevelopmentSigning(this IAsiBackboneBuilder builder)
 16    {
 017        return builder.UseLocalDevelopmentSigning(LocalDevelopmentSigningOptions.Create());
 18    }
 19
 20    /// <summary>
 21    /// Adds local-development signing and verification through the AsiBackbone builder facade using configured options.
 22    /// </summary>
 23    public static IAsiBackboneBuilder UseLocalDevelopmentSigning(
 24        this IAsiBackboneBuilder builder,
 25        LocalDevelopmentSigningOptions options)
 26    {
 027        ArgumentNullException.ThrowIfNull(builder);
 028        ArgumentNullException.ThrowIfNull(options);
 29
 030        _ = builder.Services.AddSingleton(options);
 031        _ = builder.Services.AddSingleton<LocalDevelopmentSigningService>();
 032        _ = builder.Services.AddSingleton<IAsiBackboneSigningService>(serviceProvider =>
 033            serviceProvider.GetRequiredService<LocalDevelopmentSigningService>());
 034        _ = builder.Services.AddSingleton<IAsiBackboneSignatureVerificationService>(serviceProvider =>
 035            serviceProvider.GetRequiredService<LocalDevelopmentSigningService>());
 36
 037        return builder;
 38    }
 39}