Table of Contents

Class NewtonsoftJsonMessageSerializerBuilder

Namespace
Silverback.Messaging.Configuration
Assembly
Silverback.Integration.Newtonsoft.dll
public class NewtonsoftJsonMessageSerializerBuilder
Inheritance
NewtonsoftJsonMessageSerializerBuilder
Inherited Members

Constructors

NewtonsoftJsonMessageSerializerBuilder()

public NewtonsoftJsonMessageSerializerBuilder()

Methods

Build()

Builds the IMessageSerializer instance.

public IMessageSerializer Build()

Returns

IMessageSerializer

The IMessageSerializer.

Configure(Action<JsonSerializerSettings>)

Configures the Newtonsoft.Json.JsonSerializerSettings.

public NewtonsoftJsonMessageSerializerBuilder Configure(Action<JsonSerializerSettings> configureAction)

Parameters

configureAction Action<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

encoding MessageEncoding

The MessageEncoding.

Returns

NewtonsoftJsonMessageSerializerBuilder

The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.