blob: d991a3f9b283d47a57b1c8bc0f410e64fff6c45a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
namespace Internal.TypeSystem.Ecma
{
/// <summary>
/// Override of MetadataType that uses actual Ecma335 metadata.
/// </summary>
public sealed partial class EcmaType
{
public override string DiagnosticName
{
get
{
try
{
return Name;
}
catch
{
return $"TypeDef({MetadataReader.GetToken(Handle):x8})";
}
}
}
public override string DiagnosticNamespace
{
get
{
try
{
return Namespace;
}
catch
{
return ""; // If namespace throws, then Name will as well, and it will attach the token as the name instead.
}
}
}
}
}
|