private string GetUserName(string debugHistoryPath, string correlationId) { var file = DirectoryHelper.GetFiles(debugHistoryPath).FirstOrDefault(a => a.Contains(correlationId)); if (file != null) { return(file.Split('_').Last()); } return(""); }
private IList <IDebugState> CreateDebugHistory(string debugHistoryPath, string correlationId) { var serializer = new Dev2JsonSerializer(); var file = DirectoryHelper.GetFiles(debugHistoryPath).FirstOrDefault(a => a.Contains(correlationId)); if (file == null) { return(new List <IDebugState>()); } return(serializer.Deserialize <List <IDebugState> >(FileHelper.ReadAllText(file))); }
bool DebugHasErrors(string debugHistoryPath, string correlationId) { var serializer = new Dev2JsonSerializer(); var file = DirectoryHelper.GetFiles(debugHistoryPath).FirstOrDefault(a => a.Contains(correlationId)); if (file == null) { return(false); } return(serializer.Deserialize <List <IDebugState> >(FileHelper.ReadAllText(file)).Last().HasError); }
bool DebugHistoryExists(string debugHistoryPath, string correlationId) { return(DirectoryHelper.GetFiles(debugHistoryPath).FirstOrDefault(a => a.Contains(correlationId)) != null); }