< Summary

Information
Class: NexusLabs.Needlr.Generators.Models.DiagnosticTypeInfo
Assembly: NexusLabs.Needlr.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Generators/Models/DiagnosticModels.cs
Line coverage
86%
Covered lines: 20
Uncovered lines: 3
Coverable lines: 23
Total lines: 67
Line coverage: 86.9%
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_FullName()100%11100%
get_ShortName()100%11100%
get_Lifetime()100%11100%
get_Interfaces()100%11100%
get_Dependencies()100%11100%
get_IsDecorator()100%11100%
get_IsPlugin()100%210%
get_HasFactory()100%11100%
get_KeyedValue()100%210%
get_IsInterceptor()100%210%
get_HasInterceptorProxy()100%11100%

File(s)

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

#LineLine coverage
 1namespace NexusLabs.Needlr.Generators.Models;
 2
 3/// <summary>
 4/// Simplified type information for diagnostic output (DependencyGraph, LifetimeSummary, RegistrationIndex).
 5/// Used for cross-assembly type aggregation where we don't need full symbol information.
 6/// </summary>
 7internal readonly struct DiagnosticTypeInfo
 8{
 9    public DiagnosticTypeInfo(
 10        string fullName,
 11        string shortName,
 12        GeneratorLifetime lifetime,
 13        string[] interfaces,
 14        string[] dependencies,
 15        bool isDecorator,
 16        bool isPlugin,
 17        bool hasFactory,
 18        string? keyedValue,
 19        bool isInterceptor = false,
 20        bool hasInterceptorProxy = false)
 21    {
 1822        FullName = fullName;
 1823        ShortName = shortName;
 1824        Lifetime = lifetime;
 1825        Interfaces = interfaces;
 1826        Dependencies = dependencies;
 1827        IsDecorator = isDecorator;
 1828        IsPlugin = isPlugin;
 1829        HasFactory = hasFactory;
 1830        KeyedValue = keyedValue;
 1831        IsInterceptor = isInterceptor;
 1832        HasInterceptorProxy = hasInterceptorProxy;
 1833    }
 34
 35    /// <summary>Fully qualified type name including namespace.</summary>
 3436    public string FullName { get; }
 37
 38    /// <summary>Short type name without namespace.</summary>
 15239    public string ShortName { get; }
 40
 41    /// <summary>Service lifetime (Singleton, Scoped, Transient).</summary>
 14442    public GeneratorLifetime Lifetime { get; }
 43
 44    /// <summary>Interfaces implemented by this type.</summary>
 5445    public string[] Interfaces { get; }
 46
 47    /// <summary>Constructor dependencies (type names).</summary>
 1848    public string[] Dependencies { get; }
 49
 50    /// <summary>True if this is a decorator type (has [DecoratorFor] or [OpenDecoratorFor]).</summary>
 7251    public bool IsDecorator { get; }
 52
 53    /// <summary>True if this is a Needlr plugin type.</summary>
 054    public bool IsPlugin { get; }
 55
 56    /// <summary>True if this type has [GenerateFactory] attribute.</summary>
 8657    public bool HasFactory { get; }
 58
 59    /// <summary>Keyed service value if this type has [Keyed] attribute.</summary>
 060    public string? KeyedValue { get; }
 61
 62    /// <summary>True if this is an interceptor type (has [Intercept] or is referenced by one).</summary>
 063    public bool IsInterceptor { get; }
 64
 65    /// <summary>True if this type has an interceptor proxy generated for it.</summary>
 3666    public bool HasInterceptorProxy { get; }
 67}