Class MessageSerializationContext
The context that is passed from the producer or consumer to the serializer. It can be used to customize the serialization behavior according to the endpoint.
Inherited Members
Namespace: Silverback.Messaging.Serialization
Assembly: Silverback.Integration.dll
Syntax
public class MessageSerializationContext
Constructors
| Improve this doc View sourceMessageSerializationContext(IEndpoint?, string?)
Initializes a new instance of the MessageSerializationContext class from the provided IEndpoint.
Declaration
public MessageSerializationContext(IEndpoint? endpoint, string? actualEndpointName = null)
Parameters
Type | Name | Description |
---|---|---|
IEndpoint | endpoint | The related endpoint configuration. |
string | actualEndpointName | The name of the actual related endpoint. |
Properties
| Improve this doc View sourceActualEndpointName
Gets the name of the actual endpoint (in case the Endpoint
configuration points to multiple
endpoints, for example if consuming multiple topics with a
single KafkaConsumer
).
Declaration
public string? ActualEndpointName { get; }
Property Value
Type | Description |
---|---|
string |
Empty
Gets the default instance of an empty context.
Declaration
public static MessageSerializationContext Empty { get; }
Property Value
Type | Description |
---|---|
MessageSerializationContext |
Endpoint
Gets the related endpoint configuration.
Declaration
public IEndpoint? Endpoint { get; }
Property Value
Type | Description |
---|---|
IEndpoint |