Table of Contents

Interface IPayloadCodec

Namespace
Temporalio.Converters
Assembly
Temporalio.dll

Payload codec for translating bytes to bytes.

public interface IPayloadCodec
Extension Methods

Remarks

This is often useful for encryption and/or compression.

Methods

DecodeAsync(IReadOnlyCollection<Payload>)

Decode the given collection of payloads.

Task<IReadOnlyCollection<Payload>> DecodeAsync(IReadOnlyCollection<Payload> payloads)

Parameters

payloads IReadOnlyCollection<Payload>

Payloads to decode. Do not mutate these.

Returns

Task<IReadOnlyCollection<Payload>>

Decoded payloads. This must return the exact same number that was given to EncodeAsync(IReadOnlyCollection<Payload>).

EncodeAsync(IReadOnlyCollection<Payload>)

Encode the given collection of payloads.

Task<IReadOnlyCollection<Payload>> EncodeAsync(IReadOnlyCollection<Payload> payloads)

Parameters

payloads IReadOnlyCollection<Payload>

Payloads to encode. Do not mutate these.

Returns

Task<IReadOnlyCollection<Payload>>

Encoded payloads. This must have at least one value and cannot have more than was given.