Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DynamicScope.cs
Go to the documentation of this file.
2
4
5internal sealed class DynamicScope
6{
7 internal readonly List<object> m_tokens = new List<object> { null };
8
9 internal object this[int token]
10 {
11 get
12 {
13 token &= 0xFFFFFF;
15 {
16 return null;
17 }
18 return m_tokens[token];
19 }
20 }
21
23 {
25 return (m_tokens.Count - 1) | 0xA000000;
26 }
27
28 internal string GetString(int token)
29 {
30 return this[token] as string;
31 }
32
33 internal byte[] ResolveSignature(int token, int fromMethod)
34 {
35 if (fromMethod == 0)
36 {
37 return (byte[])this[token];
38 }
39 if (!(this[token] is VarArgMethod varArgMethod))
40 {
41 return null;
42 }
43 return varArgMethod.m_signature.GetSignature(appendEndOfSig: true);
44 }
45
66
72
74 {
76 return (m_tokens.Count - 1) | 0x6000000;
77 }
78
80 {
82 return (m_tokens.Count - 1) | 0x4000000;
83 }
84
90
92 {
94 return (m_tokens.Count - 1) | 0x2000000;
95 }
96
97 public int GetTokenFor(string literal)
98 {
100 return (m_tokens.Count - 1) | 0x70000000;
101 }
102
103 public int GetTokenFor(byte[] signature)
104 {
106 return (m_tokens.Count - 1) | 0x11000000;
107 }
108}
int GetTokenFor(RuntimeTypeHandle type)
int GetTokenFor(DynamicMethod method)
int GetTokenFor(RuntimeFieldHandle field, RuntimeTypeHandle typeContext)
int GetTokenFor(RuntimeMethodHandle method)
int GetTokenFor(VarArgMethod varArgMethod)
int GetTokenFor(RuntimeMethodHandle method, RuntimeTypeHandle typeContext)
int GetTokenFor(RuntimeFieldHandle field)
byte[] ResolveSignature(int token, int fromMethod)
readonly List< object > m_tokens
int GetTokenFor(byte[] signature)
static MethodBase GetMethodBase(RuntimeModule scope, int typeMetadataToken)
static string Argument_MethodDeclaringTypeGenericLcg
Definition SR.cs:762
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
static bool IsDynamicMethod(RuntimeMethodHandleInternal method)
static RuntimeType GetDeclaringType(RuntimeMethodHandleInternal method)
static bool HasInstantiation(RuntimeType type)