Beispiel #1
0
        public static Func <Action, EJudge> IfTrue(Action action)
        {
            EJudge newEJudge = new EJudge();

            action?.Invoke();
            newEJudge.EndLabel    = newEJudge.il.DefineLabel();
            newEJudge.LabelIndex += 1;
            newEJudge.il.REmit(OpCodes.Brtrue_S, newEJudge.EndLabel);
            return(newEJudge.OneFunc);
        }
Beispiel #2
0
        public static Func <Action, EJudge> If(Action action)
        {
            EJudge newEJudge = new EJudge();

            action?.Invoke();
            newEJudge.EndLabel     = newEJudge.il.DefineLabel();
            newEJudge.CurrentLabel = newEJudge.il.DefineLabel();
            newEJudge.LabelIndex  += 1;
            newEJudge.il.REmit(ThreadCache.GetJudgeCode(), newEJudge.CurrentLabel);
            return(newEJudge.TrueFunc);
        }
Beispiel #3
0
        //其他跳转方式 已经由重载运算符完成
        public static Func <Action, EJudge> If(object temp)
        {
            EJudge newEJudge = new EJudge();

            newEJudge.il.NoErrorLoad(temp);
            newEJudge.EndLabel     = newEJudge.il.DefineLabel();
            newEJudge.CurrentLabel = newEJudge.il.DefineLabel();
            newEJudge.LabelIndex  += 1;
            newEJudge.il.REmit(ThreadCache.GetJudgeCode(), newEJudge.CurrentLabel);
            return(newEJudge.TrueFunc);
        }