using System.Collections.Generic; namespace Mono.Documentation.Updater.Statistics { /// /// The class stores statistics for different frameworks /// public class StatisticsCollector { /// /// Collected statistics for each framework /// public Dictionary Storages { get; } = new Dictionary(); /// /// Change metric value for the item /// /// The framework name which statistics is being collected /// The item which metrics value is changing /// The metrics which value is changing /// The value by which the metrics value should be changed public void AddMetric(string framework, StatisticsItem item, StatisticsMetrics metrics, int delta = 1) { if (!Storages.ContainsKey(framework)) { Storages[framework] = new StatisticsStorage(); } Storages[framework].AddMetric(item, metrics, delta); } } }