Ejemplo n.º 1
0
        internal override void Generate(CodeGenContext context, CodeEmitter ilgen)
        {
            FieldWrapper fw = StaticCompiler.GetClassForMapXml(context.ClassLoader, Class).GetFieldWrapper(Name, Sig);

            fw.Link();
            // we don't use fw.EmitGet because we don't want automatic unboxing and whatever
            ilgen.Emit(OpCodes.Ldfld, fw.GetField());
        }
Ejemplo n.º 2
0
 internal override void Generate(CodeGenContext context, CodeEmitter ilgen)
 {
     if (Type != null)
     {
         ilgen.Emit(OpCodes.Ldsfld, StaticCompiler.GetTypeForMapXml(context.ClassLoader, Type).GetField(Name, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
     }
     else
     {
         FieldWrapper fw = StaticCompiler.GetClassForMapXml(context.ClassLoader, Class).GetFieldWrapper(Name, Sig);
         fw.Link();
         // we don't use fw.EmitGet because we don't want automatic unboxing and whatever
         ilgen.Emit(OpCodes.Ldsfld, fw.GetField());
     }
 }