< Summary

Information
Class: NexusLabs.Needlr.Generators.Models.OptionsValidatorInfo
Assembly: NexusLabs.Needlr.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.Generators/Models/Options/OptionsValidatorInfo.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 29
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_MethodName()100%11100%
get_IsStatic()100%11100%
get_UsesOptionsValidatorInterface()100%11100%

File(s)

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

#LineLine coverage
 1namespace NexusLabs.Needlr.Generators.Models;
 2
 3/// <summary>
 4/// Information about a validation method.
 5/// </summary>
 6internal readonly struct OptionsValidatorInfo
 7{
 8    public OptionsValidatorInfo(
 9        string methodName,
 10        bool isStatic,
 11        bool usesOptionsValidatorInterface)
 12    {
 2413        MethodName = methodName;
 2414        IsStatic = isStatic;
 2415        UsesOptionsValidatorInterface = usesOptionsValidatorInterface;
 2416    }
 17
 18    /// <summary>Name of the validator method.</summary>
 2819    public string MethodName { get; }
 20
 21    /// <summary>True if the method is static.</summary>
 4822    public bool IsStatic { get; }
 23
 24    /// <summary>
 25    /// True when validation must be invoked through
 26    /// <c>IOptionsValidator&lt;TOptions&gt;</c>, such as an explicit interface implementation.
 27    /// </summary>
 1028    public bool UsesOptionsValidatorInterface { get; }
 29}