Show / Hide Table of Contents

    Class EndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder>

    Builds the EndpointConfiguration.

    Inheritance
    object
    EndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder>
    ConsumerEndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder>
    ProducerEndpointConfigurationBuilder<TMessage, TConfiguration, TEndpoint, TBuilder>
    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.dll
    Syntax
    public abstract class EndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder> where TConfiguration : EndpointConfiguration where TBuilder : EndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder>
    Type Parameters
    Name Description
    TMessage

    The type of the messages being produced or consumed.

    TConfiguration

    The type of the configuration being built.

    TBuilder

    The actual builder type.

    Constructors

    EndpointConfigurationBuilder(IServiceProvider, string?)

    Initializes a new instance of the EndpointConfigurationBuilder<TMessage, TConfiguration, TBuilder> class.

    Declaration
    protected EndpointConfigurationBuilder(IServiceProvider serviceProvider, string? friendlyName)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider

    The IServiceProvider.

    string friendlyName

    An optional friendly to be shown in the human-targeted output (e.g. logs, health checks result, etc.).

    Properties

    ServiceProvider

    Gets the IServiceProvider.

    Declaration
    public IServiceProvider ServiceProvider { get; }
    Property Value
    Type Description
    IServiceProvider

    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

    Build()

    Builds the endpoint configuration instance.

    Declaration
    public virtual TConfiguration Build()
    Returns
    Type Description
    TConfiguration

    The endpoint configuration.

    CreateConfiguration()

    Creates the TConfiguration instance.

    Declaration
    protected abstract TConfiguration CreateConfiguration()
    Returns
    Type Description
    TConfiguration

    The endpoint.

    DisableMessageValidation()

    Disables the message validation.

    Declaration
    public TBuilder DisableMessageValidation()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    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 not valid.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    ValidateMessageAndThrow()

    Enables the message validation and throws an exception if the message is not valid.

    Declaration
    public TBuilder ValidateMessageAndThrow()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    ValidateMessageAndWarn()

    Enables the message validation and logs a warning if the message is not valid.

    Declaration
    public TBuilder ValidateMessageAndWarn()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

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