コード例 #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());
        }
コード例 #3
0
 public static async Task <HunspellDictionary> FromFileAsync(string dictionaryFilePath, string affixFilePath) =>
 new HunspellDictionary(await WordListReader.ReadFileAsync(dictionaryFilePath, affixFilePath).ConfigureAwait(false));
コード例 #4
0
 public static async Task <HunspellDictionary> ReadAsync(Stream dictionaryStream, Stream affixStream) =>
 new HunspellDictionary(await WordListReader.ReadAsync(dictionaryStream, affixStream).ConfigureAwait(false));
コード例 #5
0
 public static HunspellDictionary FromFile(string dictionaryFilePath, string affixFilePath) =>
 new HunspellDictionary(WordListReader.ReadFile(dictionaryFilePath, affixFilePath));
コード例 #6
0
 public static HunspellDictionary Read(Stream dictionaryStream, Stream affixStream) =>
 new HunspellDictionary(WordListReader.Read(dictionaryStream, affixStream));