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

◆ Complete()

void System.Reflection.DispatchProxyGenerator.ProxyBuilder.Complete ( )
inlineprivate

Definition at line 289 of file DispatchProxyGenerator.cs.

290 {
291 Type[] array = new Type[_fields.Count];
292 for (int i = 0; i < array.Length; i++)
293 {
294 array[i] = _fields[i].FieldType;
295 }
296 ConstructorBuilder constructorBuilder = _tb.DefineConstructor(MethodAttributes.Public, CallingConventions.HasThis, array);
297 ILGenerator iLGenerator = constructorBuilder.GetILGenerator();
298 ConstructorInfo constructor = _proxyBaseType.GetConstructor(Type.EmptyTypes);
301 for (int j = 0; j < array.Length; j++)
302 {
304 iLGenerator.Emit(OpCodes.Ldarg, j + 1);
306 }
307 iLGenerator.Emit(OpCodes.Ret);
308 }
static readonly OpCode Call
Definition OpCodes.cs:83
static readonly OpCode Ret
Definition OpCodes.cs:87
static readonly OpCode Ldarg_0
Definition OpCodes.cs:9
static readonly OpCode Stfld
Definition OpCodes.cs:249
static readonly OpCode Ldarg
Definition OpCodes.cs:419
ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes)
ConstructorInfo? GetConstructor(Type[] types)
Definition Type.cs:542

References System.Reflection.DispatchProxyGenerator.ProxyBuilder._fields, System.Reflection.DispatchProxyGenerator.ProxyBuilder._proxyBaseType, System.Reflection.DispatchProxyGenerator.ProxyBuilder._tb, System.array, System.Reflection.Emit.OpCodes.Call, System.Collections.Generic.List< T >.Count, System.Reflection.Emit.TypeBuilder.DefineConstructor(), System.Type.EmptyTypes, System.Type.GetConstructor(), System.Reflection.Emit.OpCodes.Ldarg, System.Reflection.Emit.OpCodes.Ldarg_0, System.Reflection.Emit.OpCodes.Ret, and System.Reflection.Emit.OpCodes.Stfld.

Referenced by System.Reflection.DispatchProxyGenerator.ProxyBuilder.CreateType().