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()); }
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); }
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); }