Method OpenGenericAsync
- Namespace
- AvroSharp.Containers
- Assembly
- AvroSharp.dll
OpenGenericAsync(Stream, AvroSchema?, AvroFileReaderOptions?, GenericDatumReaderOptions?, CancellationToken)
Reads a file's header asynchronously and returns a reader of its objects as generic values.
public static ValueTask<AvroFileReader<AvroValue>> OpenGenericAsync(Stream stream, AvroSchema? readerSchema = null, AvroFileReaderOptions? options = null, GenericDatumReaderOptions? readerOptions = null, CancellationToken cancellationToken = default)
Parameters
streamStreamThe source, positioned at the start of the file.
readerSchemaAvroSchemaThe schema to read the objects as, resolved against the file's schema; null reads them as written.
optionsAvroFileReaderOptionsThe file options, or null for the defaults.
readerOptionsGenericDatumReaderOptionsThe generic reader's options, or null for the defaults.
cancellationTokenCancellationTokenCancels reading the header.