Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
 public void Add(SendableDictionaryPair pair)
 {
     Pairs.Add(pair);
 }