Пример #1
0
        private static StringTrie <ushort> InitDictionary()
        {
            var dictionary = new StringTrie <ushort>();

            dictionary.AddRange(Chars.Select((c, i) => new StringEntry <ushort>(c.ToString(), (ushort)i)));
            return(dictionary);
        }
Пример #2
0
        public void AddRange()
        {
            const int count = 10;

            var trie = new StringTrie <bool>();

            trie.AddRange(Enumerable.Range(0, count).Select(i => new StringEntry <bool>(i.ToString(), false)));

            Assert.Equal(count, trie.Count);
        }