Exemplo n.º 1
0
        public void Execute()
        {
            ILGenerator generator = method.MethodBuilder().MethodBuilder.GetILGenerator();

            generator.Emit(OpCodes.Ldloc, array.LocalIndex);
            generator.Emit(OpCodes.Ldc_I4, index);
            generator.Emit(OpCodes.Ldelem_Ref);
        }
Exemplo n.º 2
0
        public void Execute()
        {
            var methodGenerator = method.MethodBuilder().MethodBuilder.GetILGenerator();

            methodGenerator.Emit(OpCodes.Ldarg_0);

            if (this.parent != null)
            {
                methodGenerator.Emit(OpCodes.Ldfld, parent.Field());
            }

            methodGenerator.Emit(OpCodes.Ldfld, field());
        }
Exemplo n.º 3
0
        public void Execute()
        {
            var generator = method.MethodBuilder().MethodBuilder.GetILGenerator();

            generator.Emit(OpCodes.Ldloc, variable.LocalIndex);

            if (value != null && value is int)
            {
                generator.Emit(OpCodes.Ldc_I4, (int)value);
            }
            else if (value != null && value is string)
            {
                generator.Emit(OpCodes.Ldstr, (string)value);
            }
            else if (value != null && value is MethodParameter)
            {
                generator.Emit(OpCodes.Ldarg, ((MethodParameter)value).Index + 1);
            }

            generator.Emit(OpCodes.Callvirt, info);
        }
Exemplo n.º 4
0
 public void Execute()
 {
     method.MethodBuilder().MethodBuilder.GetILGenerator().Emit(OpCodes.Ldarg_0);
 }
Exemplo n.º 5
0
        public void Execute()
        {
            var methodGenerator = method.MethodBuilder().MethodBuilder.GetILGenerator();

            methodGenerator.Emit(OpCodes.Ldloc, localIndex);
        }