Method ToArray
ToArray<T>(AvroRegistryFraming, AvroSchemaId, T, AvroWriteAction<T>)
Writes one object as a framed message to a new array.
public static byte[] ToArray<T>(AvroRegistryFraming framing, AvroSchemaId id, T value, AvroWriteAction<T> write)
Parameters
framingAvroRegistryFramingThe registry's framing.
idAvroSchemaIdThe schema ID the registry assigned to the writer schema.
valueTThe object.
writeAvroWriteAction<T>Writes the object in the writer schema's encoding; for a generated type, its static
Writemethod.
Returns
- byte[]
Type Parameters
TThe type of the object.
ToArray(AvroRegistryFraming, AvroSchemaId, in AvroValue, GenericDatumWriter)
Writes a generic value as a framed message to a new array.
public static byte[] ToArray(AvroRegistryFraming framing, AvroSchemaId id, in AvroValue value, GenericDatumWriter writer)
Parameters
framingAvroRegistryFramingThe registry's framing.
idAvroSchemaIdThe schema ID the registry assigned to the writer's schema.
valueAvroValueThe value.
writerGenericDatumWriterThe generic writer for the schema.
Returns
- byte[]
ToArray<T>(AvroRegistryFraming, AvroSchemaId, T)
Writes a schema-registry message of a generated type to a new array.
public static byte[] ToArray<T>(AvroRegistryFraming framing, AvroSchemaId id, T value) where T : IAvroSerializable<T>
Parameters
framingAvroRegistryFramingThe message framing.
idAvroSchemaIdThe schema's ID in the registry.
valueTThe value.
Returns
- byte[]
Type Parameters
TA generated type.