Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetTokenFor() [5/9]

int System.Reflection.Emit.DynamicScope.GetTokenFor ( RuntimeMethodHandle method)
inline

Definition at line 46 of file DynamicScope.cs.

47 {
48 IRuntimeMethodInfo methodInfo = method.GetMethodInfo();
49 if (methodInfo != null)
50 {
51 RuntimeMethodHandleInternal value = methodInfo.Value;
52 if (!RuntimeMethodHandle.IsDynamicMethod(value))
53 {
54 RuntimeType declaringType = RuntimeMethodHandle.GetDeclaringType(value);
55 if (declaringType != null && RuntimeTypeHandle.HasInstantiation(declaringType))
56 {
57 MethodBase methodBase = RuntimeType.GetMethodBase(methodInfo);
58 Type genericTypeDefinition = methodBase.DeclaringType.GetGenericTypeDefinition();
59 throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, methodBase, genericTypeDefinition));
60 }
61 }
62 }
64 return (m_tokens.Count - 1) | 0x6000000;
65 }
readonly List< object > m_tokens

References System.Collections.Generic.List< T >.Add(), System.SR.Argument_MethodDeclaringTypeGenericLcg, System.Collections.Generic.List< T >.Count, System.SR.Format(), System.RuntimeMethodHandle.GetDeclaringType(), System.RuntimeType.GetMethodBase(), System.RuntimeTypeHandle.HasInstantiation(), System.RuntimeMethodHandle.IsDynamicMethod(), System.Reflection.Emit.DynamicScope.m_tokens, and System.value.