< Summary

Information
Class: NexusLabs.Needlr.Catalog.ConstructorParameterEntry
Assembly: NexusLabs.Needlr
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr/Catalog/ServiceCatalogEntry.cs
Line coverage
40%
Covered lines: 2
Uncovered lines: 3
Coverable lines: 5
Total lines: 60
Line coverage: 40%
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_Name()100%210%
get_TypeName()100%210%
get_IsKeyed()100%210%
get_ServiceKey()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr/Catalog/ServiceCatalogEntry.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.Catalog;
 2
 3/// <summary>
 4/// Represents an interface with its source location information.
 5/// </summary>
 6/// <param name="FullName">The fully qualified name of the interface.</param>
 7/// <param name="SourceFilePath">Source file path where the interface is defined, if available.</param>
 8/// <param name="SourceLine">1-based line number where the interface is defined, or 0 if unknown.</param>
 9public sealed record InterfaceEntry(
 10    string FullName,
 11    string? SourceFilePath = null,
 12    int SourceLine = 0);
 13
 14/// <summary>
 15/// Represents a service registration discovered at compile time.
 16/// </summary>
 17/// <param name="TypeName">The fully qualified name of the implementation type.</param>
 18/// <param name="ShortTypeName">The short name of the implementation type (without namespace).</param>
 19/// <param name="AssemblyName">The assembly name where this type is defined.</param>
 20/// <param name="Lifetime">The service lifetime (Singleton, Scoped, Transient).</param>
 21/// <param name="Interfaces">The interfaces this type is registered as.</param>
 22/// <param name="ConstructorParameters">Constructor parameter type names.</param>
 23/// <param name="ServiceKeys">Service keys if registered as keyed service.</param>
 24/// <param name="SourceFilePath">Source file path where the type is defined, if available.</param>
 25/// <param name="SourceLine">1-based line number where the type is defined, or 0 if unknown.</param>
 26/// <param name="InterfaceEntries">Detailed interface information including source locations.</param>
 27public sealed record ServiceCatalogEntry(
 28    string TypeName,
 29    string ShortTypeName,
 30    string AssemblyName,
 31    ServiceCatalogLifetime Lifetime,
 32    IReadOnlyList<string> Interfaces,
 33    IReadOnlyList<ConstructorParameterEntry> ConstructorParameters,
 34    IReadOnlyList<string> ServiceKeys,
 35    string? SourceFilePath = null,
 36    int SourceLine = 0,
 37    IReadOnlyList<InterfaceEntry>? InterfaceEntries = null);
 38
 39/// <summary>
 40/// Represents a constructor parameter.
 41/// </summary>
 42/// <param name="Name">The parameter name.</param>
 43/// <param name="TypeName">The fully qualified type name of the parameter.</param>
 44/// <param name="IsKeyed">True if this is a keyed service parameter.</param>
 45/// <param name="ServiceKey">The service key if this is a keyed parameter.</param>
 39946public sealed record ConstructorParameterEntry(
 047    string Name,
 048    string TypeName,
 049    bool IsKeyed = false,
 39950    string? ServiceKey = null);
 51
 52/// <summary>
 53/// Service lifetime as discovered at compile time.
 54/// </summary>
 55public enum ServiceCatalogLifetime
 56{
 57    Singleton,
 58    Scoped,
 59    Transient
 60}