public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; string[] files = Directory.GetFiles((string)Nodes[0].Execute(program), Nodes.Count == 2 ? (string)Nodes[1].Execute(program) : "*"); for (int index = 0; index < files.Length; index++) { row[0] = files[index]; result.Insert(row); } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; if (program.ServerProcess.ServerSession.Debugger != null) { foreach (DebugProcessInfo process in program.ServerProcess.ServerSession.CheckedDebugger.GetProcesses()) { row[0] = process.ProcessID; row[1] = process.IsPaused; if (process.Location != null) { row[2] = process.Location.Locator; row[3] = process.Location.Line; row[4] = process.Location.LinePos; row[5] = process.DidBreak; row[6] = process.Error; } else { row[2] = null; row[3] = null; row[4] = null; row[5] = null; row[6] = null; } result.Insert(row); } } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { int processID = (int)Nodes[0].Execute(program); LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; var debugger = program.ServerProcess.ServerSession.CheckedDebugger; if (debugger != null) { foreach (CallStackEntry entry in debugger.GetCallStack(processID)) { row[0] = entry.Index; row[1] = entry.Description; row[2] = entry.Locator.Locator; row[3] = entry.Locator.Line; row[4] = entry.Locator.LinePos; row[5] = entry.Location; row[6] = entry.Statement; result.Insert(row); } } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; var debugger = program.ServerProcess.ServerSession.CheckedDebugger; if (debugger != null) { foreach (Breakpoint entry in debugger.Breakpoints) { row[0] = entry.Locator; row[1] = entry.Line; row[2] = entry.LinePos; result.Insert(row); } } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { int processID = (int)Nodes[0].Execute(program); int windowIndex = (int)Nodes[1].Execute(program); LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; foreach (StackEntry entry in program.ServerProcess.ServerSession.CheckedDebugger.GetStack(processID, windowIndex)) { row[0] = entry.Index; row[1] = entry.Name; row[2] = entry.Type; row[3] = entry.Value; result.Insert(row); } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; foreach (Debugger debugger in program.ServerProcess.ServerSession.Server.GetDebuggers()) { row[0] = debugger.Session.SessionID; row[1] = debugger.BreakOnStart; row[2] = debugger.BreakOnException; row[3] = debugger.IsPaused; result.Insert(row); } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; if (program.ServerProcess.ServerSession.Debugger != null) { foreach (DebugSessionInfo session in program.ServerProcess.ServerSession.CheckedDebugger.GetSessions()) { row[0] = session.SessionID; result.Insert(row); } } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { string environment = (string)Nodes[0].Execute(program); using (ITable libraries = (ITable)Nodes[1].Execute(program)) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result using (Row row = new Row(program.ValueManager, result.DataType.RowType)) { row.ValuesOwned = false; using (Row libraryRow = new Row(program.ValueManager, libraries.DataType.RowType)) { while (libraries.Next()) { libraries.Select(libraryRow); PopulateRequiredFiles(program, environment, program.Catalog.Libraries[(string)libraryRow["Library_Name"]], result, row); } } } result.First(); return(result); } catch { result.Dispose(); throw; } } }
public override object InternalExecute(Program program) { LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; List <string> logs = program.ServerProcess.ServerSession.Server.ListLogs(); for (int index = 0; index < logs.Count; index++) { row[0] = index; row[1] = logs[index]; result.Insert(row); } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }
public override object InternalExecute(Program program) { string user = ""; string password = ""; if (Nodes.Count > 1) { user = (string)Nodes[1].Execute(program); password = (string)Nodes[2].Execute(program); } string listing = GetDirectoryListing((string)Nodes[0].Execute(program), user, password); LocalTable result = new LocalTable(this, program); try { result.Open(); // Populate the result Row row = new Row(program.ValueManager, result.DataType.RowType); try { row.ValuesOwned = false; int offset = 0; while (offset < listing.Length) { int nextOffset = listing.IndexOf('\n', offset + 1); if (nextOffset < 0) { nextOffset = listing.Length; } row[0] = listing.Substring(offset, nextOffset - offset).Trim(new char[] { '\r', '\n', ' ' }); offset = nextOffset; if (((string)row[0]).Trim() != "") { try { result.Insert(row); } catch (IndexException) { // Ignore duplicate keys } } } } finally { row.Dispose(); } result.First(); return(result); } catch { result.Dispose(); throw; } }