Exemple #1
0
 public static void ProcessStream(Stream csvStream, CsvReaderVisitorBase visitor, int bufferSize)
 {
     CsvSyncInput.ForStream(csvStream)
     .WithMinReadBufferByteCount(bufferSize)
     .WithReadBufferPool(null)
     .WithIgnoreUTF8ByteOrderMark(false)
     .Process(visitor);
 }
Exemple #2
0
 public static async ValueTask ProcessStreamAsync(Stream csvStream, CsvReaderVisitorBase visitor, int bufferSize, IProgress <int> progress = null, CancellationToken cancellationToken = default)
 {
     await CsvAsyncInput.ForStream(csvStream)
     .WithMinReadBufferByteCount(bufferSize)
     .WithReadBufferPool(null)
     .WithIgnoreUTF8ByteOrderMark(false)
     .ProcessAsync(visitor, progress, cancellationToken)
     .ConfigureAwait(false);
 }
Exemple #3
0
 public static void ProcessFile(string csvFilePath, CsvReaderVisitorBase visitor)
 {
     CsvSyncInput.ForMemoryMappedFile(csvFilePath)
     .WithIgnoreUTF8ByteOrderMark(false)
     .Process(visitor);
 }