Table of Contents

Interface IAsyncDeserializer<T>

Namespace
Solace.Serdes
Assembly
Solace.Serdes.dll

Asynchronous interface to convert serialized payload bytes into POCO objects. This interface supports modern .NET concurrency models and is designed for use with third-party deserialization APIs that provide async operations.

public interface IAsyncDeserializer<T>

Type Parameters

T

Generic type argument for the output object on DeserializeAsync(string, ReadOnlyMemory<byte>, IDictionary<string, object>, CancellationToken)

Extension Methods

Methods

Configure(IDictionary<string, object>)

Configures this IAsyncDeserializer<T> with the specified properties.

void Configure(IDictionary<string, object> properties)

Parameters

properties IDictionary<string, object>

The configuration properties

DeserializeAsync(string, ReadOnlyMemory<byte>, IDictionary<string, object>, CancellationToken)

Asynchronously deserializes payload bytes into a business object of type T. Optionally, headers can be provided to include additional metadata not in the payload bytes.

Task<T> DeserializeAsync(string destinationName, ReadOnlyMemory<byte> payload, IDictionary<string, object> headers = null, CancellationToken token = default)

Parameters

destinationName string

The topic or queue name to route the object.

payload ReadOnlyMemory<byte>

The ReadOnlyMemory{byte} of payload from carrier to deserialize into an object of type T.

headers IDictionary<string, object>

Defines additional headers that are not included in the payload bytes. This parameter can be used as an in/out parameter and may be modified during deserialization. May be null.

token CancellationToken

The cancellation token that can be used to cancel the asynchronous operation.

Returns

Task<T>

A task that represents the asynchronous operation. The task result contains the constructed object of type T from the payload bytes and headers (if provided).