public void TrackStatistic(string _name, long _value, string _category = "") { for (int i = 0; i < syncData.Count; i++) { if (syncData[i].GetMatch(_name, _category)) { StatisticSyncStruct entry = syncData[i]; entry.value += _value; syncData[i] = entry; return; } } AddEntry(_name, _category, _value); }
public void AddEntry(string _name, string _category, long _value) { StatisticSyncStruct syncStruct = new StatisticSyncStruct(_name, _category, _value); syncData.Add(syncStruct); }