Example #1
0
 public static IILGen Constrained(this IILGen il, Type type)
 {
     il.Emit(OpCodes.Constrained, type);
     return(il);
 }
Example #2
0
 public static IILGen BrtrueS(this IILGen il, IILLabel targetLabel)
 {
     il.Emit(OpCodes.Brtrue_S, targetLabel);
     return(il);
 }
Example #3
0
        public static IILGen LdcI4(this IILGen il, int value)
        {
            switch (value)
            {
            case 0:
                il.Emit(OpCodes.Ldc_I4_0);
                break;

            case 1:
                il.Emit(OpCodes.Ldc_I4_1);
                break;

            case 2:
                il.Emit(OpCodes.Ldc_I4_2);
                break;

            case 3:
                il.Emit(OpCodes.Ldc_I4_3);
                break;

            case 4:
                il.Emit(OpCodes.Ldc_I4_4);
                break;

            case 5:
                il.Emit(OpCodes.Ldc_I4_5);
                break;

            case 6:
                il.Emit(OpCodes.Ldc_I4_6);
                break;

            case 7:
                il.Emit(OpCodes.Ldc_I4_7);
                break;

            case 8:
                il.Emit(OpCodes.Ldc_I4_8);
                break;

            case -1:
                il.Emit(OpCodes.Ldc_I4_M1);
                break;

            default:
                if (value >= -128 && value <= 127)
                {
                    il.Emit(OpCodes.Ldc_I4_S, (sbyte)value);
                }
                else
                {
                    il.Emit(OpCodes.Ldc_I4, value);
                }
                break;
            }
            return(il);
        }
Example #4
0
 public static IILGen Stloc(this IILGen il, IILLocal localBuilder)
 {
     il.Emit(OpCodes.Stloc, localBuilder);
     return(il);
 }
Example #5
0
 public static IILGen UnboxAny(this IILGen il, Type anyType)
 {
     il.Emit(OpCodes.Unbox_Any, anyType);
     return(il);
 }
Example #6
0
 public static IILGen Ldflda(this IILGen il, IILField fieldInfo)
 {
     il.Emit(OpCodes.Ldflda, fieldInfo);
     return(il);
 }
Example #7
0
 public static IILGen ConvI4(this IILGen il)
 {
     il.Emit(OpCodes.Conv_I4);
     return(il);
 }
Example #8
0
 public static IILGen Throw(this IILGen il)
 {
     il.Emit(OpCodes.Throw);
     return(il);
 }
Example #9
0
 public static IILGen Isinst(this IILGen il, Type asType)
 {
     il.Emit(OpCodes.Isinst, asType);
     return(il);
 }
Example #10
0
 public static IILGen ConvU2(this IILGen il)
 {
     il.Emit(OpCodes.Conv_U2);
     return(il);
 }
Example #11
0
 public static IILGen Castclass(this IILGen il, Type toType)
 {
     il.Emit(OpCodes.Castclass, toType);
     return(il);
 }
Example #12
0
 public static IILGen Pop(this IILGen il)
 {
     il.Emit(OpCodes.Pop);
     return(il);
 }
Example #13
0
 public static IILGen Ret(this IILGen il)
 {
     il.Emit(OpCodes.Ret);
     return(il);
 }
Example #14
0
 public void ReplayTo(IILGen target)
 {
     target.Emit(_opCode, ((ILLocal)_ilLocal).Local);
 }
Example #15
0
 public static IILGen ConvR8(this IILGen il)
 {
     il.Emit(OpCodes.Conv_R8);
     return(il);
 }
Example #16
0
 public void ReplayTo(IILGen target)
 {
     target.Emit(_opCode, _type);
 }
Example #17
0
 public static IILGen Tail(this IILGen il)
 {
     il.Emit(OpCodes.Tailcall);
     return(il);
 }
Example #18
0
 public static IILGen Box(this IILGen il, Type boxedType)
 {
     il.Emit(OpCodes.Box, boxedType);
     return(il);
 }
Example #19
0
 public static IILGen StelemRef(this IILGen il)
 {
     il.Emit(OpCodes.Stelem_Ref);
     return(il);
 }
Example #20
0
 public static IILGen Break(this IILGen il)
 {
     il.Emit(OpCodes.Break);
     return(il);
 }
Example #21
0
 public static IILGen Add(this IILGen il)
 {
     il.Emit(OpCodes.Add);
     return(il);
 }
Example #22
0
 public static IILGen Ldsfld(this IILGen il, FieldInfo fieldInfo)
 {
     il.Emit(OpCodes.Ldsfld, fieldInfo);
     return(il);
 }
Example #23
0
 public static IILGen Sub(this IILGen il)
 {
     il.Emit(OpCodes.Sub);
     return(il);
 }
Example #24
0
 public static IILGen Stsfld(this IILGen il, IILField fieldInfo)
 {
     il.Emit(OpCodes.Stsfld, fieldInfo);
     return(il);
 }
Example #25
0
 public static IILGen Mul(this IILGen il)
 {
     il.Emit(OpCodes.Mul);
     return(il);
 }
Example #26
0
 public static IILGen Ldloca(this IILGen il, IILLocal localBuilder)
 {
     il.Emit(OpCodes.Ldloca, localBuilder);
     return(il);
 }
Example #27
0
 public static IILGen Div(this IILGen il)
 {
     il.Emit(OpCodes.Div);
     return(il);
 }
Example #28
0
 public static IILGen Brfalse(this IILGen il, IILLabel targetLabel)
 {
     il.Emit(OpCodes.Brfalse, targetLabel);
     return(il);
 }
Example #29
0
 public static IILGen Dup(this IILGen il)
 {
     il.Emit(OpCodes.Dup);
     return(il);
 }
Example #30
0
 public void ReplayTo(IILGen target)
 {
     target.Emit(_opCode, _constructorInfo);
 }
Example #31
0
 public static IILGen Ldtoken(this IILGen il, Type type)
 {
     il.Emit(OpCodes.Ldtoken, type);
     return(il);
 }
Example #32
0
 public void ReplayTo(IILGen target)
 {
     target.Emit(_opCode, _methodInfo);
 }
Example #33
0
 public static IILGen Newarr(this IILGen il, Type arrayMemberType)
 {
     il.Emit(OpCodes.Newarr, arrayMemberType);
     return(il);
 }
Example #34
0
 public void ReplayTo(IILGen target)
 {
     target.Emit(_opCode, _param);
 }
Example #35
0
 public static IILGen Ldnull(this IILGen il)
 {
     il.Emit(OpCodes.Ldnull);
     return(il);
 }