< Summary

Information
Class: NexusLabs.Needlr.Generators.Models.DiscoveredComposedRegistration
Assembly: NexusLabs.Needlr.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Generators/Models/Composition/DiscoveredComposedRegistration.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 45
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
.ctor(...)100%11100%
get_FacadeTypeName()100%11100%
get_ClosedCompositionTypeName()100%11100%
get_ConstructorArguments()100%11100%
get_Lifetime()100%11100%
get_AssemblyName()100%11100%
get_SourceFilePath()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Generators/Models/Composition/DiscoveredComposedRegistration.cs

#LineLine coverage
 1using System.Collections.Generic;
 2
 3namespace NexusLabs.Needlr.Generators.Models;
 4
 5/// <summary>
 6/// A fully resolved composed registration: one closed composition type, exposed as a facade service type,
 7/// with its constructor dependencies resolved to service-provider expressions. Emitted as a single
 8/// <c>services.Add{Lifetime}</c> registration.
 9/// </summary>
 10internal readonly struct DiscoveredComposedRegistration
 11{
 12    public DiscoveredComposedRegistration(
 13        string facadeTypeName,
 14        string closedCompositionTypeName,
 15        IReadOnlyList<string> constructorArguments,
 16        GeneratorLifetime lifetime,
 17        string assemblyName,
 18        string? sourceFilePath)
 19    {
 5520        FacadeTypeName = facadeTypeName;
 5521        ClosedCompositionTypeName = closedCompositionTypeName;
 5522        ConstructorArguments = constructorArguments;
 5523        Lifetime = lifetime;
 5524        AssemblyName = assemblyName;
 5525        SourceFilePath = sourceFilePath;
 5526    }
 27
 28    /// <summary>The fully qualified facade service type the closed composition is registered as.</summary>
 11129    public string FacadeTypeName { get; }
 30
 31    /// <summary>The fully qualified closed composition type to instantiate (e.g., global::N.FooCore&lt;global::N.AlphaD
 11132    public string ClosedCompositionTypeName { get; }
 33
 34    /// <summary>The constructor argument expressions (e.g., sp.GetRequiredService&lt;...&gt;()), in declaration order.<
 29735    public IReadOnlyList<string> ConstructorArguments { get; }
 36
 37    /// <summary>The lifetime this registration is given.</summary>
 5638    public GeneratorLifetime Lifetime { get; }
 39
 40    /// <summary>The name of the assembly that declared the composition type.</summary>
 141    public string AssemblyName { get; }
 42
 43    /// <summary>The source file path of the composition type, if available.</summary>
 11044    public string? SourceFilePath { get; }
 45}