Esempio n. 1
0
 public async IAsyncEnumerable <IRow> ReadRowsAsync(Stream stream,
                                                    [EnumeratorCancellation] CancellationToken ct = default)
 {
     using (var reader = new System.IO.StreamReader(stream, fileMetaData.Encoding))
     {
         string line;
         while ((line = await reader.ReadRowAsync(fileMetaData)) != null)
         {
             ct.ThrowIfCancellationRequested();
             yield return(rowFactory.CreateRow(tokenizer.Split(line), fileMetaData.Fields));
         }
     }
 }