Table of Contents

Class MessageContextSerializer

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Transport.Abstractions.dll

Provides serialization and deserialization of message context fields for cloud transport.

public static class MessageContextSerializer
Inheritance
MessageContextSerializer
Inherited Members

Remarks

This serializer preserves core message context fields using string key-value pairs. It is provider-agnostic and works with any cloud messaging system.

Methods

DeserializeFromDictionary(IDictionary<string, string>, IServiceProvider)

Deserializes a message context from a dictionary of string key-value pairs.

public static IMessageContext DeserializeFromDictionary(IDictionary<string, string> attributes, IServiceProvider serviceProvider)

Parameters

attributes IDictionary<string, string>

The dictionary containing serialized context fields.

serviceProvider IServiceProvider

The service provider for dependency injection.

Returns

IMessageContext

A populated message context.

SerializeToDictionary(IMessageContext)

Serializes the message context into a dictionary of string key-value pairs.

public static Dictionary<string, string> SerializeToDictionary(IMessageContext context)

Parameters

context IMessageContext

The message context to serialize.

Returns

Dictionary<string, string>

A dictionary containing context fields as string key-value pairs.