private List <LogmanTrace> GetTraces() { string response; int exitCode = this.ExecuteProgram(logmanPath, string.Empty, out response); if (exitCode != 0) { return(null); } List <LogmanTrace> list = new List <LogmanTrace>(); using (StringReader sr = new StringReader(response)) { string line; while ((line = sr.ReadLine()) != null) { Match m = traceRegex.Match(line); if (m.Success) { LogmanTrace lt = new LogmanTrace(); lt.DataCollectorSet = m.Groups["Collector"].Value; lt.Type = m.Groups["Type"].Value; lt.Status = m.Groups["Status"].Value; list.Add(lt); } } } return(list); }
private List<LogmanTrace> GetTraces() { string response; int exitCode = this.ExecuteProgram(logmanPath, string.Empty, out response); if (exitCode != 0) { return null; } List<LogmanTrace> list = new List<LogmanTrace>(); using (StringReader sr = new StringReader(response)) { string line; while ((line = sr.ReadLine()) != null) { Match m = traceRegex.Match(line); if (m.Success) { LogmanTrace lt = new LogmanTrace(); lt.DataCollectorSet = m.Groups["Collector"].Value; lt.Type = m.Groups["Type"].Value; lt.Status = m.Groups["Status"].Value; list.Add(lt); } } } return list; }