private string GetProgress() { if (LastXBuildsDict == null) { return(""); } string[] array = LastXBuildsDict.Select(x => new String($"{x.Key}-{x.Value.FailureRate:0}")).ToArray(); return(string.Join(" ", array)); }
public override string ToString() { decimal sel1Perc = Sel1Count > 0 ? Decimal.Divide(Sel1Failures, Sel1Count) : 0; decimal sel2Perc = Sel2Count > 0 ? Decimal.Divide(Sel2Failures, Sel2Count) : 0; return ($"{Name,40}: " + $"{Sel1Failures,2}/{Sel1Count,3} ({sel1Perc:N2}) " + $"{Sel2Failures,2}/{Sel2Count,3} ({sel2Perc:N2}) " + $" total: {Sel1Failures + Sel2Failures,2}/{Sel1Count + Sel2Count,3} " + $" LastXBuilds={LastXBuildsDict?.FirstOrDefault()}" + $" Progress={GetProgress()}"); }