Example #1
0
 public IEnumerable <T> IndexEnumerable(string keyName)
 {
     try { return(IndexEnumerable(Hash40Util.StringToHash40(keyName))); }
     catch (KeyNotFoundException)
     {
         throw new KeyNotFoundException($"The given key '{keyName}' was not present in the dictionary.");
     }
 }
Example #2
0
 public void Add(string keyName, T value)
 {
     try { Add(Hash40Util.StringToHash40(keyName), value); }
     catch (ArgumentException)
     {
         throw new ArgumentException($"An item with the key '{keyName}' has already been added");
     }
 }
Example #3
0
 public T this[string keyName]
 {
     get
     {
         try { return(this[Hash40Util.StringToHash40(keyName)]); }
         catch (KeyNotFoundException)
         {
             throw new KeyNotFoundException($"The given key '{keyName}' was not present in the dictionary.");
         }
     }
     set
     {
         try { this[Hash40Util.StringToHash40(keyName)] = value; }
         catch (KeyNotFoundException)
         {
             throw new KeyNotFoundException($"The given key '{keyName}' was not present in the dictionary.");
         }
     }
 }
Example #4
0
 public bool ContainsKey(string keyName)
 {
     return(ContainsKey(Hash40Util.StringToHash40(keyName)));
 }