public string GetItem(LangTranslator.PropertyType type, string name) { if (!this.m_dict.ContainsKey(name)) { return(string.Empty); } Dictionary <string, string> dictionary = this.m_dict[name]; if (!dictionary.ContainsKey(type.ToString())) { return(string.Empty); } return(dictionary[type.ToString()]); }
public Dictionary <string, string> GetItems(LangTranslator.PropertyType type) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); string key = type.ToString(); foreach (string str2 in this.m_dict.Keys) { Dictionary <string, string> dictionary2 = this.m_dict[str2]; if (dictionary2.ContainsKey(key)) { dictionary.Add(str2, dictionary2[key]); } } return(dictionary); }
// Methods public void AddItem(LangTranslator.PropertyType type, string name, string value) { Dictionary <string, string> dictionary; string str = string.Empty; if (!this.m_dict.TryGetValue(name, out dictionary)) { dictionary = new Dictionary <string, string>(); dictionary.Add(type.ToString(), value); this.m_dict.Add(name, dictionary); } else if (!dictionary.TryGetValue(type.ToString(), out str)) { dictionary.Add(type.ToString(), value); } else { dictionary[type.ToString()] = value; } }