Interface IPayloadConverter
Representation of a converter from a value to/from a payload.
Namespace: Temporalio.Converters
Assembly: Temporalio.dll
Syntax
public interface IPayloadConverter
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(Nullable<Object>)
Convert the given value to a payload.
Declaration
Payload ToPayload(object? value)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Object> | value | The value to convert. |
Returns
Type | Description |
---|---|
Payload | The converted payload. |
ToValue(Payload, Type)
Convert the given payload to a value of the given type.
Declaration
object? ToValue(Payload payload, Type type)
Parameters
Type | Name | Description |
---|---|---|
Payload | payload | The payload to convert. |
Type | type | The type to convert to. |
Returns
Type | Description |
---|---|
Nullable<Object> | The converted value. |