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

◆ Emit() [3/17]

override void System.Reflection.Emit.DynamicILGenerator.Emit ( OpCode opcode,
ConstructorInfo con )
inlinevirtual

Reimplemented from System.Reflection.Emit.ILGenerator.

Definition at line 85 of file DynamicILGenerator.cs.

86 {
87 if (con == null)
88 {
89 throw new ArgumentNullException("con");
90 }
91 RuntimeConstructorInfo runtimeConstructorInfo = con as RuntimeConstructorInfo;
92 if (runtimeConstructorInfo == null)
93 {
94 throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, "con");
95 }
96 RuntimeType runtimeType = runtimeConstructorInfo.GetRuntimeType();
97 int value = ((!(runtimeType != null) || (!runtimeType.IsGenericType && !runtimeType.IsArray)) ? GetTokenFor(runtimeConstructorInfo) : GetTokenFor(runtimeConstructorInfo, runtimeType));
99 InternalEmit(opcode);
100 UpdateStackSize(opcode, 1);
102 }
void UpdateStackSize(OpCode opcode, int stackchange)
void InternalEmit(OpCode opcode)

References System.SR.Argument_MustBeRuntimeMethodInfo, System.Reflection.Emit.ILGenerator.EnsureCapacity(), System.Reflection.RuntimeConstructorInfo.GetRuntimeType(), System.Reflection.Emit.DynamicILGenerator.GetTokenFor(), System.Reflection.Emit.ILGenerator.InternalEmit(), System.Type.IsArray, System.RuntimeType.IsGenericType, System.Reflection.Emit.ILGenerator.PutInteger4(), System.Reflection.Emit.ILGenerator.UpdateStackSize(), and System.value.