Class ConsumerEndpointBuilderDeserializeJsonUsingNewtonsoftExtensions
Adds the DeserializeJsonUsingNewtonsoft
method to the
ConsumerEndpointBuilder<TEndpoint, TBuilder>.
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Newtonsoft.dll
Syntax
public static class ConsumerEndpointBuilderDeserializeJsonUsingNewtonsoftExtensions
Methods
| Improve this doc View sourceDeserializeJsonUsingNewtonsoft<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Action<INewtonsoftJsonMessageSerializerBuilder>?)
Sets the serializer to an instance of NewtonsoftJsonMessageSerializer (or NewtonsoftJsonMessageSerializer<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 DeserializeJsonUsingNewtonsoft<TBuilder>(this IConsumerEndpointBuilder<TBuilder> endpointBuilder, Action<INewtonsoftJsonMessageSerializerBuilder>? serializerBuilderAction = null) where TBuilder : IConsumerEndpointBuilder<TBuilder>
Parameters
Type | Name | Description |
---|---|---|
IConsumerEndpointBuilder<TBuilder> | endpointBuilder | The endpoint builder. |
Action<INewtonsoftJsonMessageSerializerBuilder> | serializerBuilderAction | An optional Action<T> that takes the INewtonsoftJsonMessageSerializerBuilder 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. |