Esempio n. 1
0
 internal void GenerateStore(FieldStructure field)
 {
     var fb = field.GainField();
     if (fb.IsStatic)
     {
         Generator.Emit(OpCodes.Stsfld, fb);
     }
     else
     {
         Generator.Emit(OpCodes.Stfld, fb);
     }
 }
Esempio n. 2
0
 internal FieldInfo RenewField(FieldStructure field)
 {
     if (Info.GetType().Name == "TypeBuilderInstantiation")
     {
         return TypeBuilder.GetField(Info, field.GainField());
     }
     else
     {
         var f = field.GainField();
         var ret = Info.GetField(f.Name);
         if(ret == null)
         {
             throw new InvalidOperationException();
         }
         return ret;
     }
 }
Esempio n. 3
0
 internal void GenerateLoadAddress(FieldStructure field)
 {
     var fb = field.GainField();
     if (fb.IsStatic)
     {
         Generator.Emit(OpCodes.Ldsflda, fb);
     }
     else
     {
         Generator.Emit(OpCodes.Ldflda, fb);
     }
 }