Class EndpointBuilder<TEndpoint, TBuilder>
The base class for the builders of the types inheriting from Endpoint.
Inheritance
System.Object
EndpointBuilder<TEndpoint, TBuilder>
Implements
IEndpointBuilder<TBuilder>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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 sourceEndpointBuilder(Type, IEndpointsConfigurationBuilder)
Initializes a new instance of the EndpointBuilder<TEndpoint, TBuilder> class.
Declaration
protected EndpointBuilder(Type messageType, IEndpointsConfigurationBuilder endpointsConfigurationBuilder = null)
Parameters
Type | Name | Description |
---|---|---|
System.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 sourceEndpointsConfigurationBuilder
Gets the IEndpointsConfigurationBuilder that instantiated the builder.
Declaration
public IEndpointsConfigurationBuilder EndpointsConfigurationBuilder { get; }
Property Value
Type | Description |
---|---|
IEndpointsConfigurationBuilder |
MessageType
Declaration
public Type MessageType { get; }
Property Value
Type | Description |
---|---|
System.Type |
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 sourceBuild()
Builds the endpoint instance.
Declaration
public virtual TEndpoint Build()
Returns
Type | Description |
---|---|
TEndpoint | The endpoint. |
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. |
DisableMessageValidation()
Declaration
public TBuilder DisableMessageValidation()
Returns
Type | Description |
---|---|
TBuilder |
UseSerializer(IMessageSerializer)
Declaration
public TBuilder UseSerializer(IMessageSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IMessageSerializer | serializer |
Returns
Type | Description |
---|---|
TBuilder |
ValidateMessage(Boolean)
Declaration
public TBuilder ValidateMessage(bool throwException)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | throwException |
Returns
Type | Description |
---|---|
TBuilder |
WithEncryption(EncryptionSettings)
Declaration
public TBuilder WithEncryption(EncryptionSettings encryptionSettings)
Parameters
Type | Name | Description |
---|---|---|
EncryptionSettings | encryptionSettings |
Returns
Type | Description |
---|---|
TBuilder |
WithName(String)
Declaration
public TBuilder WithName(string friendlyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | friendlyName |
Returns
Type | Description |
---|---|
TBuilder |