private List <SuperSimpleColumnTypes.TwoColumnType> GetSystemInfo(string hostName) { var ret = new List <SuperSimpleColumnTypes.TwoColumnType>(); var path = _fileSystem.Path.Combine(RecidingLogFolder, hostName); if (!_fileSystem.DirectoryExists(path)) { return(ret); } _fileSystem.EnumerateFiles(path, "*.json").ToList().ForEach(p => { if (_fileSystem.Path.GetFileName(p).StartsWith("SystemInfo")) { string data; try { data = _fileSystem.GetReader(p)?.ReadToEnd(); ret = new ProcessCmdLineOutput().GetResutlAsSystemInfo(data); } catch (Exception e) { //create some sort of value for display. Console.WriteLine(e); throw; } } }); return(ret); }
private ProcessCmdLineOutput ParseCmdLine(string filepath) { string data = _fileSystem.GetReader(filepath)?.ReadToEnd(); var processor = new ProcessCmdLineOutput().ProcessJson(data); return(processor); }