public static string FillTestRunsTemplate(bool isAlternateRow, AllRuns testResult, string rowTemplate) { StringBuilder sbTestres = new StringBuilder(); string[] statusIcons = { "a", "ä", "ü", "û" }; string Log = string.Empty; string alternateRowCss = (isAlternateRow ? "ms-Grid-row-ms-bgColor-neutralLighterAlt" : "ms-Grid-row-ms-bgColor-neutralLighter"); string rootUrl = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"]; if (rootUrl[rootUrl.Length - 1] == '/') { rootUrl = rootUrl.Remove(rootUrl.Length - 1); } if (testResult.Log) { Log = "<a href = \"" + rootUrl + "/TestRuns/PrintLog/" + testResult.TestRunSetId + "\">Log</a>"; } else { Log = "N/A"; } return(String.Format(rowTemplate, rootUrl, testResult.TestRunSetId, statusIcons[testResult.Status], testResult.ConfiguratioName, testResult.CategoryName, testResult.AppOnly, testResult.Environment, GetTestDate(testResult.Testdate), GetTestDuration(testResult.TestDuration), testResult.Tests, testResult.Passed, testResult.Skipped, testResult.Failed, Log, testResult.GithubBranch, alternateRowCss)); }
public WorkoutEvent GetNextRace() { return(AllRuns.Where(r => r.Date > DateTime.Now).OrderBy(r => r.Date).FirstOrDefault()); }
public WorkoutEvent GetNextMarathon() { return(AllRuns.Where(r => r.Date > DateTime.Now && r.Distance.ToMiles(r.Unit.Name) > 26).OrderBy(r => r.Date).FirstOrDefault()); }
public IEnumerable <WorkoutEvent> GetPastRuns() { return(AllRuns.Where(r => r.Date.Date <= DateTime.Now.Date)); }