コード例 #1
0
        public void Remove(Spelling spelling)
        {
            if (spelling == null)
            {
                throw new ArgumentNullException(nameof(spelling));
            }

            _ = _spellings.TryRemove(spelling.GetHashCode(), out _);
            UpdateSortedSpellings();
        }
コード例 #2
0
        public void Add(Spelling spelling)
        {
            if (spelling == null)
            {
                throw new ArgumentNullException(nameof(spelling));
            }

            _spellings.AddOrUpdate(spelling.GetHashCode(), spelling, (key, oldValue) => spelling);
            UpdateSortedSpellings();
        }
コード例 #3
0
ファイル: Word.cs プロジェクト: pgrudzien12/syn-speech
 public override int GetHashCode()
 {
     return(Spelling.GetHashCode());
 }