Esempio n. 1
0
 public void Remove(T key, V value)
 {
     if (BaseMap.TryGetValue(key, out ICollection <V> list))
     {
         list.Remove(value);
     }
 }
Esempio n. 2
0
 public void Add(T key, V value)
 {
     if (!BaseMap.TryGetValue(key, out ICollection <V> list))
     {
         list = new HashSet <V>();
         BaseMap.Add(key, list);
     }
     list.Add(value);
 }
Esempio n. 3
0
 public IEnumerable <V> this[T key]
 {
     get
     {
         if (!BaseMap.TryGetValue(key, out ICollection <V> v))
         {
             return(empty);
         }
         return(v);
     }
 }