Show / Hide Table of Contents

    Class ProducerEndpointBuilderProduceBinaryFilesExtensions

    Adds the ProduceBinaryFiles method to the ProducerEndpointBuilder<TEndpoint, TBuilder>.

    Inheritance
    object
    ProducerEndpointBuilderProduceBinaryFilesExtensions
    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 ProducerEndpointBuilderProduceBinaryFilesExtensions

    Methods

    | Improve this doc View source

    ProduceBinaryFiles<TBuilder>(IProducerEndpointBuilder<TBuilder>, Action<IBinaryFileMessageSerializerBuilder>?)

    Sets the serializer to an instance of BinaryFileMessageSerializer (or BinaryFileMessageSerializer<TModel>) to produce the BinaryFileMessage.

    By default this serializer forwards the message type in an header to let the consumer know which type has to be deserialized. This approach allows to mix messages of different types in the same endpoint and it's ideal when both the producer and the consumer are using Silverback but might not be optimal for interoperability. This behavior can be changed using the builder action and specifying the model to be used.

    Declaration
    public static TBuilder ProduceBinaryFiles<TBuilder>(this IProducerEndpointBuilder<TBuilder> endpointBuilder, Action<IBinaryFileMessageSerializerBuilder>? serializerBuilderAction = null) where TBuilder : IProducerEndpointBuilder<TBuilder>
    Parameters
    Type Name Description
    IProducerEndpointBuilder<TBuilder> endpointBuilder

    The endpoint builder.

    Action<IBinaryFileMessageSerializerBuilder> serializerBuilderAction

    An optional Action<T> that takes the IBinaryFileMessageSerializerBuilder 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.

    Remarks

    This replaces the IMessageSerializer and the endpoint will only be able to deal with binary files.

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