< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 63
Line coverage: 0%
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 Cyclomatic complexity NPath complexity Sequence coverage
IsHeapHandle(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/HandleKind.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Reflection.Metadata.Ecma335;
 5
 6namespace System.Reflection.Metadata
 7{
 8    public enum HandleKind : byte
 9    {
 10        ModuleDefinition = (byte)HandleType.Module,
 11        TypeReference = (byte)HandleType.TypeRef,
 12        TypeDefinition = (byte)HandleType.TypeDef,
 13        FieldDefinition = (byte)HandleType.FieldDef,
 14        MethodDefinition = (byte)HandleType.MethodDef,
 15        Parameter = (byte)HandleType.ParamDef,
 16        InterfaceImplementation = (byte)HandleType.InterfaceImpl,
 17        MemberReference = (byte)HandleType.MemberRef,
 18        Constant = (byte)HandleType.Constant,
 19        CustomAttribute = (byte)HandleType.CustomAttribute,
 20        DeclarativeSecurityAttribute = (byte)HandleType.DeclSecurity,
 21        StandaloneSignature = (byte)HandleType.Signature,
 22        EventDefinition = (byte)HandleType.Event,
 23        PropertyDefinition = (byte)HandleType.Property,
 24        MethodImplementation = (byte)HandleType.MethodImpl,
 25        ModuleReference = (byte)HandleType.ModuleRef,
 26        TypeSpecification = (byte)HandleType.TypeSpec,
 27        AssemblyDefinition = (byte)HandleType.Assembly,
 28        AssemblyFile = (byte)HandleType.File,
 29        AssemblyReference = (byte)HandleType.AssemblyRef,
 30        ExportedType = (byte)HandleType.ExportedType,
 31        GenericParameter = (byte)HandleType.GenericParam,
 32        MethodSpecification = (byte)HandleType.MethodSpec,
 33        GenericParameterConstraint = (byte)HandleType.GenericParamConstraint,
 34        ManifestResource = (byte)HandleType.ManifestResource,
 35
 36        // Debug handles
 37        Document = (byte)HandleType.Document,
 38        MethodDebugInformation = (byte)HandleType.MethodDebugInformation,
 39        LocalScope = (byte)HandleType.LocalScope,
 40        LocalVariable = (byte)HandleType.LocalVariable,
 41        LocalConstant = (byte)HandleType.LocalConstant,
 42        ImportScope = (byte)HandleType.ImportScope,
 43        CustomDebugInformation = (byte)HandleType.CustomDebugInformation,
 44
 45        // Heap handles
 46        NamespaceDefinition = (byte)HandleType.Namespace,
 47        UserString = (byte)HandleType.UserString,
 48        String = (byte)HandleType.String,
 49        Blob = (byte)HandleType.Blob,
 50        Guid = (byte)HandleType.Guid,
 51
 52        // note that the highest bit is reserved for virtual bit on Handle
 53    }
 54
 55    internal static class HandleKindExtensions
 56    {
 57        internal static bool IsHeapHandle(this HandleKind kind)
 058        {
 059            return kind >= HandleKind.NamespaceDefinition;
 060        }
 61    }
 62}
 63