コード例 #1
0
        private void AddToStorage(WordInfo word)
        {
            if (word.Word == _key)
            {
                return;
            }

            var newKey = GetNewKey(word.Word);

            WordStorage wordStorage;

            if (!_storageList.TryGetValue(newKey, out wordStorage))
            {
                wordStorage = new WordStorage(newKey);
                _storageList.Add(newKey, wordStorage);
            }

            wordStorage.AddWord(word);
        }
コード例 #2
0
        public void AddWord(WordInfo word)
        {
            _words.Add(word);

            AddToStorage(word);
        }