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