public override object Execute(LogicExecuteMethodInformation executeMethodInformation) { if (this.aba == null) { Log.Error("LogicIfThenElseAction: ConditionAction = null"); return(null); } LogicEntityObject logicEntityObject = executeMethodInformation.LogicEntityObject; bool flag = false; int num = 0; bool flag2; if (logicEntityObject != null) { if (executeMethodInformation.CurrentClassActionsLevelIndex < executeMethodInformation.CallActionsLevelIndexes.Count) { flag = true; num = executeMethodInformation.CallActionsLevelIndexes[executeMethodInformation.CurrentClassActionsLevelIndex]; flag2 = (num < 10000); if (num >= 10000) { num -= 10000; } } else { flag2 = (bool)this.aba.Execute(executeMethodInformation); } } else { flag2 = (bool)this.aba.Execute(executeMethodInformation); } List <LogicAction> list = flag2 ? this.abB : this.abb; for (int i = num; i < list.Count; i++) { LogicAction logicAction = list[i]; if (!flag) { executeMethodInformation.PushCallActionsLevelIndex(flag2 ? i : (i + 10000)); } flag = false; executeMethodInformation.CurrentClassActionsLevelIndex++; object result = logicAction.Execute(executeMethodInformation); executeMethodInformation.CurrentClassActionsLevelIndex--; if (executeMethodInformation.NeedReturnForWait) { return(null); } executeMethodInformation.PopCallActionsLevelIndex(); if (LogicUtils.A() != 0f) { executeMethodInformation.PushCallActionsLevelIndex((flag2 ? i : (i + 10000)) + 1); if (executeMethodInformation.LogicEntityObject != null) { executeMethodInformation.LogicEntityObject.CreateWaitingThreadItem(LogicUtils.a(), LogicUtils.A()); } LogicUtils.A(0f); LogicUtils.A(""); return(null); } if (executeMethodInformation.NeedReturn) { return(result); } } return(null); }
internal object A(LogicExecuteMethodInformation logicExecuteMethodInformation) { LogicEntityObject logicEntityObject = logicExecuteMethodInformation.LogicEntityObject; bool flag = false; int num = 0; if (logicEntityObject != null) { LogicEntityObject expr_0F = logicEntityObject; expr_0F.SetCurrentExecutingMethodLevel(expr_0F.GetCurrentExecutingMethodLevel() + 1); if (logicEntityObject.GetCurrentExecutingMethodLevel() >= logicEntityObject.GetCurrentExecutingMethodInformations().Count) { logicEntityObject.GetCurrentExecutingMethodInformations().Add(logicExecuteMethodInformation); } else { if (logicEntityObject.GetCurrentExecutingMethodInformations()[logicEntityObject.GetCurrentExecutingMethodLevel()] != logicExecuteMethodInformation) { Log.Fatal("LogicDesignerMethod: Internal error: Execute: logicEntityObject.CurrentExecutingMethodInformations[logicEntityObject.CurrentExecutingMethodLevel] != executeMethodInformation"); } flag = true; num = logicExecuteMethodInformation.CallActionsLevelIndexes[logicExecuteMethodInformation.CurrentClassActionsLevelIndex]; } } object result = null; for (int i = num; i < this.actions.Count; i++) { LogicAction logicAction = this.actions[i]; if (!flag) { logicExecuteMethodInformation.PushCallActionsLevelIndex(i); } flag = false; logicExecuteMethodInformation.CurrentClassActionsLevelIndex++; object obj = logicAction.Execute(logicExecuteMethodInformation); logicExecuteMethodInformation.CurrentClassActionsLevelIndex--; if (logicExecuteMethodInformation.NeedReturnForWait) { if (logicEntityObject != null) { LogicEntityObject expr_C7 = logicEntityObject; expr_C7.SetCurrentExecutingMethodLevel(expr_C7.GetCurrentExecutingMethodLevel() - 1); } return(null); } logicExecuteMethodInformation.PopCallActionsLevelIndex(); if (LogicUtils.A() != 0f) { logicExecuteMethodInformation.PushCallActionsLevelIndex(i + 1); if (logicExecuteMethodInformation.LogicEntityObject != null) { logicExecuteMethodInformation.LogicEntityObject.CreateWaitingThreadItem(LogicUtils.a(), LogicUtils.A()); } LogicUtils.A(0f); LogicUtils.A(""); if (logicEntityObject != null) { LogicEntityObject expr_128 = logicEntityObject; expr_128.SetCurrentExecutingMethodLevel(expr_128.GetCurrentExecutingMethodLevel() - 1); } return(null); } if (logicExecuteMethodInformation.NeedReturn) { result = obj; break; } } if (logicExecuteMethodInformation.LogicEntityObject != null) { logicExecuteMethodInformation.LogicEntityObject.GetCurrentExecutingMethodInformations().RemoveAt(logicExecuteMethodInformation.LogicEntityObject.GetCurrentExecutingMethodInformations().Count - 1); } if (logicEntityObject != null) { LogicEntityObject expr_18A = logicEntityObject; expr_18A.SetCurrentExecutingMethodLevel(expr_18A.GetCurrentExecutingMethodLevel() - 1); } return(result); }
public override object Execute(LogicExecuteMethodInformation executeMethodInformation) { if (this.abf == null) { Log.Error("LogicWhileAction: ConditionAction = null"); return(null); } LogicEntityObject logicEntityObject = executeMethodInformation.LogicEntityObject; bool flag = false; int num = 0; bool flag2; if (logicEntityObject != null) { if (executeMethodInformation.CurrentClassActionsLevelIndex < executeMethodInformation.CallActionsLevelIndexes.Count) { flag = true; num = executeMethodInformation.CallActionsLevelIndexes[executeMethodInformation.CurrentClassActionsLevelIndex]; flag2 = true; } else { flag2 = (bool)this.abf.Execute(executeMethodInformation); } } else { flag2 = (bool)this.abf.Execute(executeMethodInformation); } while (flag2) { for (int i = num; i < this.abG.Count; i++) { LogicAction logicAction = this.abG[i]; if (!flag) { executeMethodInformation.PushCallActionsLevelIndex(i); } flag = false; executeMethodInformation.CurrentClassActionsLevelIndex++; object result = logicAction.Execute(executeMethodInformation); executeMethodInformation.CurrentClassActionsLevelIndex--; if (executeMethodInformation.NeedReturnForWait) { return(null); } executeMethodInformation.PopCallActionsLevelIndex(); if (LogicUtils.A() != 0f) { executeMethodInformation.PushCallActionsLevelIndex(i + 1); if (executeMethodInformation.LogicEntityObject != null) { executeMethodInformation.LogicEntityObject.CreateWaitingThreadItem(LogicUtils.a(), LogicUtils.A()); } LogicUtils.A(0f); LogicUtils.A(""); return(null); } if (executeMethodInformation.NeedReturn) { return(result); } } num = 0; flag2 = (bool)this.abf.Execute(executeMethodInformation); } return(null); }