Table of Contents

Interface IPayloadConverter

Namespace
Temporalio.Converters
Assembly
Temporalio.dll

Representation of a converter from a value to/from a payload.

public interface IPayloadConverter
Extension Methods

Remarks

This converter should be deterministic since it is used for workflows. For the same reason, this converter should be immediate and avoid any network calls or any asynchronous/slow code paths.

Methods

ToPayload(object?)

Convert the given value to a payload.

Payload ToPayload(object? value)

Parameters

value object

The value to convert.

Returns

Payload

The converted payload.

Remarks

Implementers are expected to be able just return the payload for IRawValue.

ToValue(Payload, Type)

Convert the given payload to a value of the given type.

object? ToValue(Payload payload, Type type)

Parameters

payload Payload

The payload to convert.

type Type

The type to convert to.

Returns

object

The converted value.

Remarks

Implementers are expected to be able to support types of IRawValue.

See Also