< Summary

Information
Class: NexusLabs.Needlr.Generators.Models.ComposedConstraintViolation
Assembly: NexusLabs.Needlr.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Generators/Models/Composition/ComposedConstraintViolation.cs
Line coverage
88%
Covered lines: 8
Uncovered lines: 1
Coverable lines: 9
Total lines: 33
Line coverage: 88.8%
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_CompositionTypeName()100%11100%
get_TypeArgumentName()100%11100%
get_SourceInterfaceName()100%11100%
get_SourceFilePath()100%210%

File(s)

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

#LineLine coverage
 1namespace NexusLabs.Needlr.Generators.Models;
 2
 3/// <summary>
 4/// Records that a discovered type argument cannot legally close a composition type because it violates
 5/// the composition's generic constraints. Surfaced as the <c>NDLRGEN038</c> build diagnostic, and the
 6/// corresponding registration is skipped rather than emitting code that fails to compile.
 7/// </summary>
 8internal readonly struct ComposedConstraintViolation
 9{
 10    public ComposedConstraintViolation(
 11        string compositionTypeName,
 12        string typeArgumentName,
 13        string sourceInterfaceName,
 14        string? sourceFilePath)
 15    {
 3416        CompositionTypeName = compositionTypeName;
 3417        TypeArgumentName = typeArgumentName;
 3418        SourceInterfaceName = sourceInterfaceName;
 3419        SourceFilePath = sourceFilePath;
 3420    }
 21
 22    /// <summary>The composition type that could not be closed (e.g., FooCore&lt;TData&gt;).</summary>
 3423    public string CompositionTypeName { get; }
 24
 25    /// <summary>The offending type argument(s), comma-separated (e.g., StructData).</summary>
 3426    public string TypeArgumentName { get; }
 27
 28    /// <summary>The source open generic interface whose implementation produced the type argument.</summary>
 3429    public string SourceInterfaceName { get; }
 30
 31    /// <summary>The source file path of the composition type, if available.</summary>
 032    public string? SourceFilePath { get; }
 33}