public void LoadTable(List <string> tables) { foreach (var row in tables) { var splitRow = row.Split(", "); if (splitRow[0] != rowName) { continue; } var entry = new IlmEntry(int.Parse(splitRow[4])); var key = splitRow[1] + ", " + splitRow[2] + ", " + splitRow[3]; entries.Add(key, entry); } }
private void LoadTableFromFile(string configFilePath) { foreach (var row in File.ReadAllLines(configFilePath)) { var splitRow = row.Split(", "); if (splitRow[0] != rowName || splitRow.Length < 4) { continue; } var entry = new IlmEntry(int.Parse(splitRow[4])); var key = splitRow[1] + ", " + splitRow[2] + ", " + splitRow[3]; entries.Add(key, entry); } }