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.
Inheritance
System.Object
MessageSerializationContext
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.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. |
System.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 |
---|---|
System.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 |