Xamarin Public Jenkins (auto-signing) 95fdb59ea6 Imported Upstream version 6.6.0.89
Former-commit-id: b39a328747c2f3414dc52e009fb6f0aa80ca2492
2019-09-24 08:53:40 +00:00

31 lines
1.1 KiB
C#

using System.Collections.Generic;
using System.Text;
namespace Mono.Documentation.Updater.Statistics
{
public static class StatisticsFormatter
{
public static string Format(Dictionary<string, StatisticsStorage> input)
{
var result = new StringBuilder();
foreach (var statisticsStoragePair in input)
{
var framework = statisticsStoragePair.Key;
var statisticsStorage = statisticsStoragePair.Value;
result.AppendLine($"Framework: {framework}");
result.AppendLine("--------");
foreach (var statistics in statisticsStorage.Values)
{
var staticsItem = statistics.Key;
foreach (var statisticsValuePair in statistics.Value)
{
result.AppendLine($"{staticsItem} {statisticsValuePair.Key}: {statisticsValuePair.Value}");
}
result.AppendLine();
}
}
return result.ToString();
}
}
}