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()); }
public static AffixConfig Read(IHunspellLineReader reader, AffixConfig.Builder builder = null) { var readerInstance = new AffixReader(builder, reader); readerInstance.Read(); return(readerInstance.Builder.MoveToImmutable()); }
public static IEnumerable <string> ReadLines(this IHunspellLineReader reader) { string line; while ((line = reader.ReadLine()) != null) { yield return(line); } }
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 <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 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); }
public AffixReader(AffixConfig.Builder builder, IHunspellLineReader reader) { Builder = builder ?? new AffixConfig.Builder(); Reader = reader; }