internal ConstructorInfo RenewConstructor(ConstructorStructure constructor) { if (Info.GetType().Name == "TypeBuilderInstantiation") { return TypeBuilder.GetConstructor(Info, constructor.GainConstructor()); } else { var c = constructor.GainConstructor(); var types = Info.RenewTypes(c.GetParameters().ToTypes()); var ret = Info.GetConstructor(types); if (ret == null) { throw new InvalidOperationException(); } return ret; } }
internal override BuilderStructure RenewInstance(TypeStructure type) { var ret = new ConstructorStructure(); ret.Info = type.RenewConstructor(this); return ret; }
public void RegisterSuperConstructor(ConstructorStructure super) { SuperConstructor = super; }
internal void GenerateCall(ConstructorStructure constructor) { Generator.Emit(OpCodes.Call, constructor.GainConstructor()); }
internal void GenerateNew(ConstructorStructure constructor) { Generator.Emit(OpCodes.Newobj, constructor.GainConstructor()); }