< Summary

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

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/PortablePdbVersions.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
 5{
 6    internal static class PortablePdbVersions
 7    {
 8        /// <summary>
 9        /// Version of Portable PDB format emitted by the writer by default. Metadata version string.
 10        /// </summary>
 11        internal const string DefaultMetadataVersion = "PDB v1.0";
 12
 13        /// <summary>
 14        /// Version of Portable PDB format emitted by the writer by default.
 15        /// </summary>
 16        internal const ushort DefaultFormatVersion = 0x0100;
 17
 18        /// <summary>
 19        /// Minimal supported version of Portable PDB format.
 20        /// </summary>
 21        internal const ushort MinFormatVersion = 0x0100;
 22
 23        /// <summary>
 24        /// Minimal supported version of Embedded Portable PDB blob.
 25        /// </summary>
 26        internal const ushort MinEmbeddedVersion = 0x0100;
 27
 28        /// <summary>
 29        /// Version of Embedded Portable PDB blob format emitted by the writer by default.
 30        /// </summary>
 31        internal const ushort DefaultEmbeddedVersion = 0x0100;
 32
 33        /// <summary>
 34        /// Minimal version of the Embedded Portable PDB blob that the current reader can't interpret.
 35        /// </summary>
 36        internal const ushort MinUnsupportedEmbeddedVersion = 0x0200;
 37
 38        internal const uint DebugDirectoryEmbeddedSignature = 0x4244504d;
 39
 40        internal const ushort PortableCodeViewVersionMagic = 0x504d;
 041        internal static uint DebugDirectoryEntryVersion(ushort portablePdbVersion) => PortableCodeViewVersionMagic << 16
 042        internal static uint DebugDirectoryEmbeddedVersion(ushort portablePdbVersion) => (uint)DefaultEmbeddedVersion <<
 043        internal static string Format(ushort version) => (version >> 8) + "." + (version & 0xff);
 44    }
 45}
 46