Show / Hide Table of Contents

    Class NewtonsoftJsonMessageSerializerBuilder

    Builds the NewtonsoftJsonMessageSerializer.

    Inheritance
    object
    NewtonsoftJsonMessageSerializerBuilder
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Configuration
    Assembly: Silverback.Integration.Newtonsoft.dll
    Syntax
    public class NewtonsoftJsonMessageSerializerBuilder

    Constructors

    NewtonsoftJsonMessageSerializerBuilder()

    Builds the NewtonsoftJsonMessageSerializer.

    Declaration
    public NewtonsoftJsonMessageSerializerBuilder()

    Methods

    Build()

    Builds the IMessageSerializer instance.

    Declaration
    public IMessageSerializer Build()
    Returns
    Type Description
    IMessageSerializer

    The IMessageSerializer.

    Configure(Action<JsonSerializerSettings>)

    Configures the Newtonsoft.Json.JsonSerializerSettings.

    Declaration
    public NewtonsoftJsonMessageSerializerBuilder Configure(Action<JsonSerializerSettings> configureAction)
    Parameters
    Type Name Description
    Action<JsonSerializerSettings> configureAction

    An Action<T> that takes the Newtonsoft.Json.JsonSerializerSettings and configures it.

    Returns
    Type Description
    NewtonsoftJsonMessageSerializerBuilder

    The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.

    DisableTypeHeader()

    Specifies that the message type header (see MessageType) must not be set.

    Declaration
    public NewtonsoftJsonMessageSerializerBuilder DisableTypeHeader()
    Returns
    Type Description
    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.

    Declaration
    public NewtonsoftJsonMessageSerializerBuilder SetTypeHeader()
    Returns
    Type Description
    NewtonsoftJsonMessageSerializerBuilder

    The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.

    WithEncoding(MessageEncoding)

    Specifies the encoding to be used.

    Declaration
    public NewtonsoftJsonMessageSerializerBuilder WithEncoding(MessageEncoding encoding)
    Parameters
    Type Name Description
    MessageEncoding encoding

    The MessageEncoding.

    Returns
    Type Description
    NewtonsoftJsonMessageSerializerBuilder

    The NewtonsoftJsonMessageSerializerBuilder so that additional calls can be chained.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini