public object GetValue(string key) { SendableDictionaryPair p = Pairs.Find(x => (string)x.Key == key); if (p == null) { //Uncomment if using Debug.cs //Debug.Warn($"[Serializer.SendableDictionary.GetValue] Couldn't find object with key {key} inside Pairs!"); return(null); } return(p.Value); }
public object GetValue(object key) { SendableDictionaryPair p = Pairs.Find(x => x.Key == key); if (p == null) { //Uncomment if using Debug.cs //Debug.Warn($"[Serializer.SendableDictionary.GetValue] Couldn't find object with key {key} inside Pairs! <= Can be ignored if mod doesn't crash afterwards"); return(null); } object value = p.Value; return(value); }
public void Add(SendableDictionaryPair pair) { Pairs.Add(pair); }