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."); } }
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"); } }
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."); } } }
public bool ContainsKey(string keyName) { return(ContainsKey(Hash40Util.StringToHash40(keyName))); }