< Summary

Information
Class: NexusLabs.Needlr.Injection.Reflection.ReflectionFallbackContext
Assembly: NexusLabs.Needlr.Injection.Reflection
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Injection.Reflection/ReflectionFallbackContext.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 30
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
get_ComponentName()100%11100%
get_Reason()100%11100%
get_ReflectionComponentType()100%11100%
get_GeneratedComponentType()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Injection.Reflection/ReflectionFallbackContext.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.Injection.Reflection;
 2
 3/// <summary>
 4/// Provides context information when a reflection-based component is used as a fallback
 5/// because no source-generated component is available.
 6/// </summary>
 7[DoNotAutoRegister]
 8public sealed class ReflectionFallbackContext
 9{
 10    /// <summary>
 11    /// Gets the name of the component that triggered the reflection fallback.
 12    /// </summary>
 1813    public required string ComponentName { get; init; }
 14
 15    /// <summary>
 16    /// Gets a description of why the fallback occurred.
 17    /// </summary>
 1618    public required string Reason { get; init; }
 19
 20    /// <summary>
 21    /// Gets the type of the reflection-based component being used.
 22    /// </summary>
 1723    public required Type ReflectionComponentType { get; init; }
 24
 25    /// <summary>
 26    /// Gets the type of the source-generated component that would have been used if available.
 27    /// May be null if the reflection package doesn't have visibility to source-gen types.
 28    /// </summary>
 1529    public Type? GeneratedComponentType { get; init; }
 30}