Emit() public abstract méthode

public abstract Emit ( IMemberEmitter member, ILGenerator gen ) : void
member IMemberEmitter
gen System.Reflection.Emit.ILGenerator
Résultat void
Exemple #1
0
        public override void Emit(IMemberEmitter member, ILGenerator gen)
        {
            if (reference != null)
            {
                ArgumentsUtil.EmitLoadOwnerAndReference(reference, gen);
            }
            else if (expression != null)
            {
                expression.Emit(member, gen);
            }
            else
            {
                if (member.ReturnType != typeof(void))
                {
                    OpCodeUtil.EmitLoadOpCodeForDefaultValueOfType(gen, member.ReturnType);
                }
            }

            gen.Emit(OpCodes.Ret);
        }
        public override void Emit(IMemberEmitter member, ILGenerator gen)
        {
            if (reference != null)
            {
                ArgumentsUtil.EmitLoadOwnerAndReference(reference, gen);
            }
            else if (expression != null)
            {
                expression.Emit(member, gen);
            }

            var notNull = gen.DefineLabel();

            gen.Emit(OpCodes.Brtrue_S, notNull);
            ifNull.Emit(member, gen);
            gen.MarkLabel(notNull);
            if (ifNotNull != null)             // yeah, I know that reads funny :)
            {
                ifNotNull.Emit(member, gen);
            }
        }
 public override void Emit(IMemberEmitter member, ILGenerator gen)
 {
     // TODO: Should it discard any possible return value with a pop?
     expression.Emit(member, gen);
 }
 public override void Emit(IMemberEmitter member, ILGenerator gen)
 {
     ArgumentsUtil.EmitLoadOwnerAndReference(argument, gen);
     expression.Emit(member, gen);
 }