Show / Hide Table of Contents

    Class EndpointBuilder<TEndpoint, TBuilder>

    The base class for the builders of the types inheriting from Endpoint.

    Inheritance
    object
    EndpointBuilder<TEndpoint, TBuilder>
    ConsumerEndpointBuilder<TEndpoint, TBuilder>
    ProducerEndpointBuilder<TEndpoint, TBuilder>
    Implements
    IEndpointBuilder<TBuilder>
    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 abstract class EndpointBuilder<TEndpoint, TBuilder> : IEndpointBuilder<TBuilder> where TEndpoint : Endpoint where TBuilder : IEndpointBuilder<TBuilder>
    Type Parameters
    Name Description
    TEndpoint

    The type of the endpoint being built.

    TBuilder

    The actual builder type.

    Constructors

    | Improve this doc View source

    EndpointBuilder(Type?, IEndpointsConfigurationBuilder?)

    Initializes a new instance of the EndpointBuilder<TEndpoint, TBuilder> class.

    Declaration
    protected EndpointBuilder(Type? messageType, IEndpointsConfigurationBuilder? endpointsConfigurationBuilder = null)
    Parameters
    Type Name Description
    Type messageType

    The type of the message being produced or consumed.

    IEndpointsConfigurationBuilder endpointsConfigurationBuilder

    The optional reference to the IEndpointsConfigurationBuilder that instantiated the builder.

    Properties

    | Improve this doc View source

    EndpointsConfigurationBuilder

    Gets the IEndpointsConfigurationBuilder that instantiated the builder.

    Declaration
    public IEndpointsConfigurationBuilder? EndpointsConfigurationBuilder { get; }
    Property Value
    Type Description
    IEndpointsConfigurationBuilder
    | Improve this doc View source

    MessageType

    Gets the type of the message being produced or consumed.

    Declaration
    public Type? MessageType { get; }
    Property Value
    Type Description
    Type
    Remarks

    This value might be used during the configuration to automatically determine some configurations (e.g. the correct serializer to be used) without having to specify the message type once again.

    | Improve this doc View source

    This

    Gets this instance.

    Declaration
    protected abstract TBuilder This { get; }
    Property Value
    Type Description
    TBuilder
    Remarks

    This is necessary to work around casting in the base classes.

    Methods

    | Improve this doc View source

    Build()

    Builds the endpoint instance.

    Declaration
    public virtual TEndpoint Build()
    Returns
    Type Description
    TEndpoint

    The endpoint.

    | Improve this doc View source

    CreateEndpoint()

    Creates the endpoint to be configured according to the options stored in the builder.

    Declaration
    protected abstract TEndpoint CreateEndpoint()
    Returns
    Type Description
    TEndpoint

    The endpoint.

    | Improve this doc View source

    DisableMessageValidation()

    Disables the message validation.

    Declaration
    public TBuilder DisableMessageValidation()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    UseSerializer(IMessageSerializer)

    Specifies the IMessageSerializer to be used serialize or deserialize the messages.

    Declaration
    public TBuilder UseSerializer(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The IMessageSerializer.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    ValidateMessage(bool)

    Enables the message validation.

    Declaration
    public TBuilder ValidateMessage(bool throwException)
    Parameters
    Type Name Description
    bool throwException

    A value that specifies whether an exception should be thrown if the message is invalid.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    WithEncryption(EncryptionSettings?)

    Enables the end-to-end message encryption.

    Declaration
    public TBuilder WithEncryption(EncryptionSettings? encryptionSettings)
    Parameters
    Type Name Description
    EncryptionSettings encryptionSettings

    The EncryptionSettings.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    WithName(string)

    Specifies an optional friendly name to be used to identify the endpoint. This name can be used to filter or retrieve the endpoints and will also be included in the DisplayName, to be shown in the human-targeted output (e.g. logs, health checks result, etc.).

    Declaration
    public TBuilder WithName(string friendlyName)
    Parameters
    Type Name Description
    string friendlyName

    The friendly name.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    Implements

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