Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TypeReference.cs
Go to the documentation of this file.
2
4
5public readonly struct TypeReference
6{
7 private readonly MetadataReader _reader;
8
9 private readonly uint _treatmentAndRowId;
10
11 private int RowId => (int)(_treatmentAndRowId & 0xFFFFFF);
12
14
16
18 {
19 get
20 {
21 if (Treatment == TypeRefTreatment.None)
22 {
24 }
26 }
27 }
28
30 {
31 get
32 {
33 if (Treatment == TypeRefTreatment.None)
34 {
36 }
37 return GetProjectedName();
38 }
39 }
40
42 {
43 get
44 {
45 if (Treatment == TypeRefTreatment.None)
46 {
48 }
49 return GetProjectedNamespace();
50 }
51 }
52
54 {
55 get
56 {
57 if (Treatment == TypeRefTreatment.None)
58 {
59 return TypeRefSignatureTreatment.None;
60 }
62 }
63 }
64
65 internal TypeReference(MetadataReader reader, uint treatmentAndRowId)
66 {
67 _reader = reader;
68 _treatmentAndRowId = treatmentAndRowId;
69 }
70
72 {
73 switch (Treatment)
74 {
75 case TypeRefTreatment.SystemDelegate:
76 case TypeRefTreatment.SystemAttribute:
78 case TypeRefTreatment.UseProjectionInfo:
80 default:
81 return default(AssemblyReferenceHandle);
82 }
83 }
84
86 {
87 if (Treatment == TypeRefTreatment.UseProjectionInfo)
88 {
90 }
92 }
93
95 {
96 switch (Treatment)
97 {
98 case TypeRefTreatment.SystemDelegate:
99 case TypeRefTreatment.SystemAttribute:
101 case TypeRefTreatment.UseProjectionInfo:
103 default:
104 return default(StringHandle);
105 }
106 }
107
116}
static TypeRefSignatureTreatment GetProjectedSignatureTreatment(int projectionIndex)
static AssemblyReferenceHandle GetProjectedAssemblyRef(int projectionIndex)
static StringHandle GetProjectedName(int projectionIndex)
static StringHandle GetProjectedNamespace(int projectionIndex)
static AssemblyReferenceHandle FromVirtualIndex(VirtualIndex virtualIndex)
EntityHandle GetResolutionScope(TypeReferenceHandle handle)
StringHandle GetName(TypeReferenceHandle handle)
StringHandle GetNamespace(TypeReferenceHandle handle)
static StringHandle FromVirtualIndex(VirtualIndex virtualIndex)
static TypeReferenceHandle FromRowId(int rowId)
TypeRefSignatureTreatment SignatureTreatment
TypeReference(MetadataReader reader, uint treatmentAndRowId)
TypeRefSignatureTreatment GetProjectedSignatureTreatment()