Method SerializeAsync
SerializeAsync(T, SerializationContext)
Writes a value: its schema ID (registered or looked up once per subject), then its Avro encoding.
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Every exception goes into the returned task, as an async method's does.")]
public override Task<byte[]?> SerializeAsync(T value, SerializationContext context)
Parameters
valueTThe value. A null reference is written as no message body.
contextSerializationContextThe topic, the component (key or value) and the headers.