public void Remove(Spelling spelling)
        {
            if (spelling == null)
            {
                throw new ArgumentNullException(nameof(spelling));
            }

            _ = _spellings.TryRemove(spelling.GetHashCode(), out _);
            UpdateSortedSpellings();
        }
        public void Add(Spelling spelling)
        {
            if (spelling == null)
            {
                throw new ArgumentNullException(nameof(spelling));
            }

            _spellings.AddOrUpdate(spelling.GetHashCode(), spelling, (key, oldValue) => spelling);
            UpdateSortedSpellings();
        }
Beispiel #3
0
 public override int GetHashCode()
 {
     return(Spelling.GetHashCode());
 }