confluent-kafka-dotnet
Show / Hide Table of Contents

Struct SerializationContext

Context relevant to a serialization or deserialization operation.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public struct SerializationContext

Constructors

SerializationContext(MessageComponentType, string, Headers)

Create a new SerializationContext object instance.

Declaration
public SerializationContext(MessageComponentType component, string topic, Headers headers = null)
Parameters
TypeNameDescription
MessageComponentTypecomponent

The component of the message the serialization operation relates to.

stringtopic

The topic the data is being written to or read from.

Headersheaders

The collection of message headers (or null). Specifying null or an empty list are equivalent. The order of headers is maintained, and duplicate header keys are allowed.

Properties

Component

The component of the message the serialization operation relates to.

Declaration
public readonly MessageComponentType Component { get; }
Property Value
TypeDescription
MessageComponentType

Empty

The default SerializationContext value (representing no context defined).

Declaration
public static SerializationContext Empty { get; }
Property Value
TypeDescription
SerializationContext

Headers

The collection of message headers (or null). Specifying null or an empty list are equivalent. The order of headers is maintained, and duplicate header keys are allowed.

Declaration
public readonly Headers Headers { get; }
Property Value
TypeDescription
Headers

Topic

The topic the data is being written to or read from.

Declaration
public readonly string Topic { get; }
Property Value
TypeDescription
string
In this article