Skip to content

EventDataExtensions Methods

Extends EventData to support streaming

DeserializeProperties(ArraySegment<byte>, Serializer)

staticextension
View source
public static IDictionary<string, object> DeserializeProperties(this ArraySegment<byte> bytes, Serializer serializer)
Deserializes event data properties

Parameters

bytesArraySegment<byte>
The serialized properties.
serializerSerializer
The serializer used to deserialize application properties.

GetStreamNamespaceProperty(EventData)

staticextension
View source
public static string? GetStreamNamespaceProperty(this EventData eventData)
Gets stream namespace from the EventData

Parameters

eventDataEventData
The event data to read.

Returns

The stored stream namespace, or null if none is present.

SerializeProperties(EventData, Serializer)

staticextension
View source
public static byte[] SerializeProperties(this EventData eventData, Serializer serializer)
Serializes event data properties

Parameters

eventDataEventData
The event data containing the properties to serialize.
serializerSerializer
The serializer used to serialize application properties.

SetStreamNamespaceProperty(EventData, string?)

staticextension
View source
public static void SetStreamNamespaceProperty(this EventData eventData, string? streamNamespace)
Adds stream namespace to the EventData

Parameters

eventDataEventData
The event data to update.
streamNamespacestring?
The stream namespace value to store.