Show / Hide Table of Contents

    Class ConsumerEndpointBuilderDeserializeJsonExtensions

    Adds the DeserializeJson method to the ConsumerEndpointBuilder<TEndpoint, TBuilder>.

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

    Methods

    | Improve this doc View source

    DeserializeJson<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.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini