Class NewtonsoftJsonMessageSerializerBuilder
- Namespace
- Silverback.Messaging.Configuration
- Assembly
- Silverback.Integration.Newtonsoft.dll
Builds the NewtonsoftJsonMessageSerializer.
public class NewtonsoftJsonMessageSerializerBuilder
- Inheritance
-
NewtonsoftJsonMessageSerializerBuilder
- Inherited Members
Constructors
NewtonsoftJsonMessageSerializerBuilder()
public NewtonsoftJsonMessageSerializerBuilder()
Methods
Build()
Builds the IMessageSerializer instance.
public IMessageSerializer Build()
Returns
Configure(Action<JsonSerializerSettings>)
Configures the Newtonsoft.Json.JsonSerializerSettings.
public NewtonsoftJsonMessageSerializerBuilder Configure(Action<JsonSerializerSettings> configureAction)
Parameters
configureActionAction<JsonSerializerSettings>An Action<T> that takes the Newtonsoft.Json.JsonSerializerSettings and configures it.
Returns
- NewtonsoftJsonMessageSerializerBuilder
The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.
DisableTypeHeader()
Specifies that the message type header (see MessageType) must not be set.
public NewtonsoftJsonMessageSerializerBuilder DisableTypeHeader()
Returns
- NewtonsoftJsonMessageSerializerBuilder
The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.
SetTypeHeader()
Specifies that the message type header (see MessageType) must be set. This is necessary when sending multiple message type through the same endpoint, to allow Silverback to automatically figure out the correct type to deserialize into.
public NewtonsoftJsonMessageSerializerBuilder SetTypeHeader()
Returns
- NewtonsoftJsonMessageSerializerBuilder
The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.
WithEncoding(MessageEncoding)
Specifies the encoding to be used.
public NewtonsoftJsonMessageSerializerBuilder WithEncoding(MessageEncoding encoding)
Parameters
encodingMessageEncodingThe MessageEncoding.
Returns
- NewtonsoftJsonMessageSerializerBuilder
The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.