示例#1
0
 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;
 }
示例#4
0
 internal void GenerateCall(ConstructorStructure constructor)
 {
     Generator.Emit(OpCodes.Call, constructor.GainConstructor());
 }
示例#5
0
 internal void GenerateNew(ConstructorStructure constructor)
 {
     Generator.Emit(OpCodes.Newobj, constructor.GainConstructor());
 }