Class BinaryProtoConverter
Encoding converter for protobuf binary data.
Implements
Namespace: Temporalio.Converters
Assembly: Temporalio.dll
Syntax
public class BinaryProtoConverter : object, IEncodingConverter
Properties
Encoding
Gets the encoding name this converter represents.
Declaration
public string Encoding { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Implementers must put this value on the "encoding" metadata of created payloads.
Methods
ToValue(Payload, Type)
Convert the given payload to the given type or error.
Declaration
public object? ToValue(Payload payload, Type type)
Parameters
Type | Name | Description |
---|---|---|
Payload | payload | The payload to convert from. |
Type | type | The type to convert to. |
Returns
Type | Description |
---|---|
Nullable<Object> | The converted value. |
Remarks
This call is guaranteed to only be called for payloads whose metadata match Encoding. This should error if it cannot convert to the given type.
TryToPayload(Nullable<Object>, out Payload)
Try to convert the given value to the given payload or return false if this converter cannot handle it and the next should be tried.
Declaration
public bool TryToPayload(object? value, out Payload payload)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Object> | value | The value to convert. |
Payload | payload | The payload to set. |
Returns
Type | Description |
---|---|
Boolean | True if this converter can and has converted the value. |
Remarks
Implementers must put the Encoding value on the "encoding" metadata of created payloads.