< Summary

Information
Class: NexusLabs.Needlr.TypeExtensions
Assembly: NexusLabs.Needlr
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr/TypeExtensions.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 17
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsStatic(...)100%22100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr/TypeExtensions.cs

#LineLine coverage
 1namespace NexusLabs.Needlr;
 2
 3/// <summary>
 4/// Extension methods for <see cref="Type"/> to provide additional type inspection capabilities.
 5/// </summary>
 6public static class TypeExtensions
 7{
 8    /// <summary>
 9    /// Determines whether the specified type is a static class.
 10    /// </summary>
 11    /// <param name="type">The type to check.</param>
 12    /// <returns>True if the type is static (abstract and sealed); otherwise, false.</returns>
 13    public static bool IsStatic(this Type type)
 14    {
 38415        return type.IsAbstract && type.IsSealed;
 16    }
 17}

Methods/Properties

IsStatic(System.Type)