private void ParseJson() { m_MemDumps.Clear(); for (int i = 0; i < m_OpenedFiles.Count; ++i) { MemDump dump = JsonConvert.DeserializeObject <MemDump>(File.ReadAllText(m_OpenedFiles[i])); m_MemDumps.Add(dump); } }
public static Dictionary <string, List <int> > GenerateData(List <MemDump> memDumps, out int highestCount) { m_EntryToTotal.Clear(); highestCount = 0; for (int i = 0; i < memDumps.Count; ++i) { MemDump dump = memDumps[i]; foreach (string key in dump.Datum.Entries.Keys) { if (!m_EntryToTotal.ContainsKey(key)) { m_EntryToTotal.Add(key, new List <int>()); } m_EntryToTotal[key].Add(dump.Datum.Entries[key].Total); if (m_EntryToTotal[key].Count > highestCount) { highestCount = m_EntryToTotal[key].Count; } } foreach (string key in dump.Mobs.Entries.Keys) { if (!m_EntryToTotal.ContainsKey(key)) { m_EntryToTotal.Add(key, new List <int>()); } m_EntryToTotal[key].Add(dump.Mobs.Entries[key].Total); if (m_EntryToTotal[key].Count > highestCount) { highestCount = m_EntryToTotal[key].Count; } } foreach (string key in dump.Obj.Entries.Keys) { if (!m_EntryToTotal.ContainsKey(key)) { m_EntryToTotal.Add(key, new List <int>()); } m_EntryToTotal[key].Add(dump.Obj.Entries[key].Total); if (m_EntryToTotal[key].Count > highestCount) { highestCount = m_EntryToTotal[key].Count; } } } return(m_EntryToTotal); }