Esempio n. 1
0
        public static async Task <AffixConfig> ReadAsync(IHunspellLineReader reader, AffixConfig.Builder builder = null)
        {
            var readerInstance = new AffixReader(builder, reader);

            await readerInstance.ReadAsync().ConfigureAwait(false);

            return(readerInstance.Builder.MoveToImmutable());
        }
Esempio n. 2
0
        public static AffixConfig Read(IHunspellLineReader reader, AffixConfig.Builder builder = null)
        {
            var readerInstance = new AffixReader(builder, reader);

            readerInstance.Read();

            return(readerInstance.Builder.MoveToImmutable());
        }
Esempio n. 3
0
        public static IEnumerable <string> ReadLines(this IHunspellLineReader reader)
        {
            string line;

            while ((line = reader.ReadLine()) != null)
            {
                yield return(line);
            }
        }
Esempio n. 4
0
        public static async Task <List <string> > ReadLinesAsync(this IHunspellLineReader reader)
        {
            var lines = new List <string>();

            string line;

            while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) != null)
            {
                lines.Add(line);
            }

            return(lines);
        }
Esempio n. 5
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());
        }
Esempio n. 6
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());
        }
        public static IEnumerable <string> ReadLines(this IHunspellLineReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            string line;

            while ((line = reader.ReadLine()) != null)
            {
                yield return(line);
            }
        }
        public static async Task <IEnumerable <string> > ReadLinesAsync(this IHunspellLineReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            var lines = new List <string>();

            string line;

            while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) != null)
            {
                lines.Add(line);
            }

            return(lines);
        }
Esempio n. 9
0
 public AffixReader(AffixConfig.Builder builder, IHunspellLineReader reader)
 {
     Builder = builder ?? new AffixConfig.Builder();
     Reader  = reader;
 }