< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 23
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
GetTypeDefinitionId(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/ExportedTypeExtensions.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
 4namespace System.Reflection.Metadata.Ecma335
 5{
 6    /// <summary>
 7    /// Provides an extension method to access the TypeDefinitionId column of the ExportedType table.
 8    /// </summary>
 9    public static class ExportedTypeExtensions
 10    {
 11        /// <summary>
 12        /// Gets a hint at the likely row number of the target type in the TypeDef table of its module.
 13        /// If the namespaces and names do not match, resolution falls back to a full search of the
 14        /// target TypeDef table. Ignored and should be zero if <see cref="ExportedType.IsForwarder"/> is
 15        /// true.
 16        /// </summary>
 17        public static int GetTypeDefinitionId(this ExportedType exportedType)
 018        {
 019            return exportedType.reader.ExportedTypeTable.GetTypeDefId(exportedType.rowId);
 020        }
 21    }
 22}
 23