Class ConsumerEndpointBuilderDeserializeJsonExtensions
Adds the DeserializeJson
method to the
ConsumerEndpointBuilder<TEndpoint, TBuilder>.
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.dll
Syntax
public static class ConsumerEndpointBuilderDeserializeJsonExtensions
Methods
| Improve this doc View sourceDeserializeJson<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Action<IJsonMessageSerializerBuilder>?)
Sets the serializer to an instance of JsonMessageSerializer (or JsonMessageSerializer<TMessage>) to deserialize the consumed JSON.
By default this serializer relies on the message type header to determine the type of the message to be deserialized. This behavior can be changed using the builder action and specifying a fixed message type.
Declaration
public static TBuilder DeserializeJson<TBuilder>(this IConsumerEndpointBuilder<TBuilder> endpointBuilder, Action<IJsonMessageSerializerBuilder>? serializerBuilderAction = null) where TBuilder : IConsumerEndpointBuilder<TBuilder>
Parameters
Type | Name | Description |
---|---|---|
IConsumerEndpointBuilder<TBuilder> | endpointBuilder | The endpoint builder. |
Action<IJsonMessageSerializerBuilder> | serializerBuilderAction | An optional Action<T> that takes the IJsonMessageSerializerBuilder and configures it. |
Returns
Type | Description |
---|---|
TBuilder | The endpoint builder so that additional calls can be chained. |
Type Parameters
Name | Description |
---|---|
TBuilder | The actual builder type. |