< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 17
Coverable lines: 17
Total lines: 38
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 8
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)0%880%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/ImportDefinition.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.Diagnostics;
 5
 6namespace System.Reflection.Metadata
 7{
 8    public readonly struct ImportDefinition
 9    {
 010        public ImportDefinitionKind Kind { get; }
 011        public BlobHandle Alias { get; }
 012        public AssemblyReferenceHandle TargetAssembly { get; }
 13
 014        public BlobHandle TargetNamespace => (BlobHandle)_typeOrNamespace;
 015        public EntityHandle TargetType => (EntityHandle)_typeOrNamespace;
 16        private readonly Handle _typeOrNamespace;
 17
 18        internal ImportDefinition(
 19            ImportDefinitionKind kind,
 20            BlobHandle alias = default(BlobHandle),
 21            AssemblyReferenceHandle assembly = default(AssemblyReferenceHandle),
 22            Handle typeOrNamespace = default(Handle))
 023        {
 024            Debug.Assert(
 025                typeOrNamespace.IsNil ||
 026                typeOrNamespace.Kind == HandleKind.Blob ||
 027                typeOrNamespace.Kind == HandleKind.TypeDefinition ||
 028                typeOrNamespace.Kind == HandleKind.TypeReference ||
 029                typeOrNamespace.Kind == HandleKind.TypeSpecification);
 30
 031            Kind = kind;
 032            Alias = alias;
 033            TargetAssembly = assembly;
 034            _typeOrNamespace = typeOrNamespace;
 035        }
 36    }
 37}
 38