Exemplo n.º 1
0
 public void Set(string key, AutocompleteElement element)
 {
     lock (_mapLock)
     {
         var map = _map.Value;
         if (map == null)
         {
             map        = new Dictionary <string, AutocompleteElement>();
             _map.Value = map;
             map.Add(key, element);
         }
         else
         {
             map.Remove(key);
             map.Add(key, element);
         }
     }
 }
Exemplo n.º 2
0
 public static void Register(string key, AutocompleteElement element)
 {
     Map.Set(key, element);
 }