Table of Contents

Method Create

Namespace
AvroSharp.Messages
Assembly
AvroSharp.dll

Create<T>(AvroRegistryFraming, IAvroSchemaIdResolver, Func<AvroSchema, AvroReadFunc<T>>, AvroRegistryReaderOptions?)

Creates a reader of messages in framing.

public static AvroRegistryMessageReader<T> Create<T>(AvroRegistryFraming framing, IAvroSchemaIdResolver resolver, Func<AvroSchema, AvroReadFunc<T>> createReader, AvroRegistryReaderOptions? options = null)

Parameters

framing AvroRegistryFraming

The registry's framing.

resolver IAvroSchemaIdResolver

Finds each message's writer schema by its ID.

createReader Func<AvroSchema, AvroReadFunc<T>>

Called once per writer schema; returns the function that reads one object of it. For a generated type, return its Read method when the schema is its own, and a function calling Read(ref reader, writerSchema) otherwise.

options AvroRegistryReaderOptions

Limits, or null for the defaults.

Returns

AvroRegistryMessageReader<T>

Type Parameters

T

The type read.

Create<T>(AvroRegistryFraming, IAvroSchemaIdResolver, AvroRegistryReaderOptions?)

Creates a reader of schema-registry messages of a generated type, resolving other writer schemas.

public static AvroRegistryMessageReader<T> Create<T>(AvroRegistryFraming framing, IAvroSchemaIdResolver resolver, AvroRegistryReaderOptions? options = null) where T : IAvroSerializable<T>

Parameters

framing AvroRegistryFraming

The message framing.

resolver IAvroSchemaIdResolver

Finds each message's writer schema by its ID.

options AvroRegistryReaderOptions

Limits, or null for the defaults.

Returns

AvroRegistryMessageReader<T>

Type Parameters

T

A generated type.