| | | 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 | | |
| | | 4 | | namespace 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; |
| | 0 | 41 | | internal static uint DebugDirectoryEntryVersion(ushort portablePdbVersion) => PortableCodeViewVersionMagic << 16 |
| | 0 | 42 | | internal static uint DebugDirectoryEmbeddedVersion(ushort portablePdbVersion) => (uint)DefaultEmbeddedVersion << |
| | 0 | 43 | | internal static string Format(ushort version) => (version >> 8) + "." + (version & 0xff); |
| | | 44 | | } |
| | | 45 | | } |
| | | 46 | | |