public void addOrUpdateStat(eInt64Stat stat, Int64 value) { sInt64Stat entry; if (int64Stats.TryGetValue(stat, out entry)) { entry.value = value; int64Stats[stat] = entry; } else { entry = new sInt64Stat(stat, value); int64Stats.Add(stat, entry); } }
void parseInt64Stats(StreamReader inputFile) { short amount = 0; int sectionHeader = Utils.readInt32(inputFile); if (sectionHeader >> 16 == 0x40) { amount = (short)sectionHeader; for (int i = 0; i < amount; i++) { sInt64Stat newStat = new sInt64Stat(inputFile); int64Stats.Add(newStat.key, newStat); } } }