public override string[] GetIndexCodesPhp(MethodInfoPointer owner, JsMethodCompiler data, UInt32 branchId) { ParameterInfo[] ps = owner.Info; SubMethodParameterInfo p = (SubMethodParameterInfo)ps[0]; string[] pss = new string[1]; pss[0] = codeName2(p.CodeName, branchId); return(pss); }
public abstract string GetIncrementalStatementPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId);
public abstract string GetTestExpressionPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId);
public override string GetIncrementalStatementPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId) { ParameterInfo[] ps = owner.Info; SubMethodParameterInfo p = (SubMethodParameterInfo)ps[0]; string incr = string.Format(CultureInfo.InvariantCulture, "{0}++", codeName2(p.CodeName, branchId)); return(incr); }
public override string GetTestExpressionPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId) { ParameterInfo[] ps = owner.Info; SubMethodParameterInfo p = (SubMethodParameterInfo)ps[0]; string bin = string.Format(CultureInfo.InvariantCulture, "{0} < count({1});", codeName2(p.CodeName, branchId), owner.Owner.GetPhpScriptReferenceCode(jsCode)); return(bin); }
public override bool OnExportJavaScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { if (_conditionAction != null) { if (IsCompiled) { return(false); } //preventing of compiling it twice IsCompiled = true; if (_conditionAction.TrueActions != null && _conditionAction.FalseActions != null && _conditionAction.TrueActions.BranchId == _conditionAction.FalseActions.BranchId) { throw new DesignerException("Condition action [{0}, {1}] goes to the same action", this.FirstActionBranchId, _conditionAction.Name); } try { StringCollection sts = methodCode; string c; if (_conditionAction.Condition == null) { c = "true"; } else { _conditionAction.Condition.SetDataType(typeof(bool)); c = _conditionAction.Condition.CreateJavaScript(sts); } bool b1 = false; bool b2 = false; string indent = Indentation.GetIndent(); sts.Add(indent); sts.Add("if("); sts.Add(c); sts.Add(") {\r\n"); if (_ifBlock != null) { Indentation.IndentIncrease(); b1 = _ifBlock.OnExportJavaScriptCode(previousAction, null, jsCode, sts, data); Indentation.IndentDecrease(); } sts.Add(indent); sts.Add("}\r\n"); if (_elseBlock != null) { sts.Add(indent); sts.Add("else {\r\n"); Indentation.IndentIncrease(); b2 = _elseBlock.OnExportJavaScriptCode(previousAction, null, jsCode, sts, data); Indentation.IndentDecrease(); sts.Add(indent); sts.Add("}\r\n"); } if (_mergeBlock != null) { return(_mergeBlock.OnExportJavaScriptCode(null, null, jsCode, sts, data)); } else { return(b1 && b2); } } catch (Exception err) { throw new DesignerException(err, "Error compiling Condition action {0}. See inner exception for details", _conditionAction.TraceInfo); } } return(false); }
public override string GetTestExpressionPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId) { return(null); }
public void ExportClientServerCode(ActionBranch currentAction, ActionBranch nextAction, ILimnorCodeCompiler compiler, IMethodCompile methodToCompile, CodeMemberMethod method, CodeStatementCollection statements, bool debug, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { }
public void ExportJavaScriptCode(ActionBranch currentAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodToCompile, JsMethodCompiler data) { }
public override void OnExportClientServerCode(ActionBranch previousAction, ActionBranch nextAction, ILimnorCodeCompiler compiler, CodeMemberMethod method, CodeStatementCollection statements, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { }
public override bool OnExportPhpScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { return(false); }
public override bool OnExportJavaScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { if (_eventAction != null) { _eventAction.AttachJavascriptAction(this.BranchId, methodCode, Indentation.GetIndent()); } return(false); }
public override bool OnExportJavaScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { if (_nextAction != null && _nextAction.FirstActionBranch != null && _nextAction.FirstActionBranch.InPortCount < 2) { return(_nextAction.OnExportJavaScriptCode(previousAction, nextAction, jsCode, methodCode, data)); } return(false); }
public abstract bool OnExportJavaScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data);
public abstract string[] GetIndexCodesPhp(MethodInfoPointer owner, JsMethodCompiler data, UInt32 branchId);
public void ExportPhpScriptCode(ActionBranch currentAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodToCompile, JsMethodCompiler data) { base.ExportPhpScriptCode(jsCode, methodToCompile, data); }
public void ExportPhpScriptCode(LimnorDesigner.Action.ActionBranch currentAction, LimnorDesigner.Action.ActionBranch nextAction, System.Collections.Specialized.StringCollection jsCode, System.Collections.Specialized.StringCollection methodToCompile, JsMethodCompiler data) { throw new NotImplementedException(); }
public override string[] GetIndexCodesPhp(MethodInfoPointer owner, JsMethodCompiler data, UInt32 branchId) { return(null); }
public void ExportClientServerCode(LimnorDesigner.Action.ActionBranch currentAction, LimnorDesigner.Action.ActionBranch nextAction, ILimnorCodeCompiler compiler, MathExp.IMethodCompile methodToCompile, System.CodeDom.CodeMemberMethod method, System.CodeDom.CodeStatementCollection statements, bool debug, System.Collections.Specialized.StringCollection jsCode, System.Collections.Specialized.StringCollection methodCode, JsMethodCompiler data) { throw new NotImplementedException(); }
public override string GetIncrementalStatementPhp(MethodInfoPointer owner, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data, UInt32 branchId) { return(null); }
public override bool OnExportJavaScriptCode(ActionBranch previousAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodCode, JsMethodCompiler data) { if (_act != null) { bool bRet = _act.ExportJavaScriptCode(previousAction, nextAction, jsCode, methodCode, data); if (!bRet) { ActionBranch prev = _act; List <ActionBranch> nexts = _act.NextActions; while (nexts != null && nexts.Count > 0) { if (nexts[0] != null) { if (nexts[0].InPortCount > 1 || nexts[0].OutportCount > 1) { if (nexts[0].InPortCount < 2) { bRet = _mergeBlock.OnExportJavaScriptCode(_act, null, jsCode, methodCode, data); } break; } else { bRet = nexts[0].ExportJavaScriptCode(_act, null, jsCode, methodCode, data); if (bRet) { break; } else { prev = nexts[0]; nexts = nexts[0].NextActions; } } } else { break; } } } return(bRet); } return(false); }