예제 #1
0
        public static async Task <WordList> ReadAsync(IHunspellLineReader dictionaryReader, AffixConfig affix, WordList.Builder builder = null)
        {
            var readerInstance = new WordListReader(builder, affix);

            string line;

            while ((line = await dictionaryReader.ReadLineAsync().ConfigureAwait(false)) != null)
            {
                readerInstance.ParseLine(line);
            }

            return(readerInstance.Builder.MoveToImmutable());
        }
예제 #2
0
        public static WordList Read(IHunspellLineReader dictionaryReader, AffixConfig affix, WordList.Builder builder = null)
        {
            var readerInstance = new WordListReader(builder, affix);

            string line;

            while ((line = dictionaryReader.ReadLine()) != null)
            {
                readerInstance.ParseLine(line);
            }

            return(readerInstance.Builder.MoveToImmutable());
        }