private static LNode StmtToCSharp(LNode stmt, IMacroContext context, bool execContext, Symbol parentConstruct) { if (!stmt.IsCall) { return(stmt); } if (stmt.Calls(S.Braces)) { return(null); } var helpers = RVList <LNode> .Empty; ExecInfo info; if (!StatementTypes.TryGetValueSafe(stmt.Name, out info)) { info = new ExecInfo(-1, execContext); } var args = stmt.Args; for (int i = info.IgnoreMax; i < stmt.Args.Count; i++) { if (i == info.BraceIndex) { continue; } } return(stmt); }
internal bool getExecIndex(int modelindex, out int index) { ExecInfo info; if (execmap.TryGetValue(modelindex, out info)) { index = info.index; return(true); } else { if (filter.show_execution(modelindex)) { index = execs.Count + 1; ExecInfo ei = new ExecInfo(modelindex, index); execmap[modelindex] = ei; execs.Add(ei); return(true); } else { index = 0; return(false); } } }
void OnBeforeExecute() { _isExecuting = true; Cursor = Cursors.WaitCursor; ExecInfo.Clear(); StatusLbl.Text = "Running..."; ExecBtn.Text = "&Cancel"; }
public int ToModelThread(int exec, int thread) { if (exec < 1 || exec > execs.Count) { return(-1); } ExecInfo info = execs[exec - 1]; if (thread < 1 || thread > info.ts.Count) { return(-1); } return(info.ts[thread - 1]); }
public string Evaluate(int exec_period_secs, string command, string workdir) { string id = GenerateUniqueIdFromExecParameters(command, workdir); ExecInfo exec_info; lock (this) { if (!m_ExecInfos.TryGetValue(id, out exec_info)) { exec_info = new ExecInfo(exec_period_secs, command, workdir); m_ExecInfos.Add(id, exec_info); } } return exec_info.GetValue(exec_period_secs); }
public string Evaluate(int exec_period_secs, string command, string workdir) { string id = GenerateUniqueIdFromExecParameters(command, workdir); ExecInfo exec_info; lock (this) { if (!m_ExecInfos.TryGetValue(id, out exec_info)) { exec_info = new ExecInfo(exec_period_secs, command, workdir); m_ExecInfos.Add(id, exec_info); } } return(exec_info.GetValue(exec_period_secs)); }
internal bool getThreadIndex(int modelindex, int thread, out int index) { ExecInfo info = execmap[modelindex]; if (info.tmap.TryGetValue(thread, out index)) { return(true); } else { if (filter.show_thread(modelindex, thread)) { index = info.tmap.Count + 1; info.tmap[thread] = index; info.ts.Add(thread); return(true); } else { index = 0; return(false); } } }
void ExecPrint(string value) { ExecInfo.AppendText(value + Environment.NewLine); }
public ExecInfoTest() { _ExecInfo = new ExecInfo(); }
private static LNode StmtToCSharp(LNode stmt, IMacroContext context, bool execContext, Symbol parentConstruct) { if (!stmt.IsCall) return stmt; if (stmt.Calls(S.Braces)) return null; var helpers = RVList<LNode>.Empty; ExecInfo info; if (!StatementTypes.TryGetValueSafe(stmt.Name, out info)) info = new ExecInfo(-1, execContext); var args = stmt.Args; for (int i = info.IgnoreMax; i < stmt.Args.Count; i++) { if (i == info.BraceIndex) continue; } return stmt; }