• API Documentation
Search Results for

    Show / Hide Table of Contents
    • Temporalio
      • IPayloadCodec
      • Refs<T>
      • Refs<T>.IProxy
    • Temporalio.Api.Batch.V1
      • BatchOperationCancellation
      • BatchOperationDeletion
      • BatchOperationInfo
      • BatchOperationSignal
      • BatchOperationTermination
      • MessageReflection
    • Temporalio.Api.Command.V1
      • AcceptWorkflowUpdateCommandAttributes
      • CancelTimerCommandAttributes
      • CancelWorkflowExecutionCommandAttributes
      • Command
      • Command.AttributesOneofCase
      • CompleteWorkflowExecutionCommandAttributes
      • CompleteWorkflowUpdateCommandAttributes
      • ContinueAsNewWorkflowExecutionCommandAttributes
      • FailWorkflowExecutionCommandAttributes
      • MessageReflection
      • ModifyWorkflowPropertiesCommandAttributes
      • RecordMarkerCommandAttributes
      • RejectWorkflowUpdateCommandAttributes
      • RequestCancelActivityTaskCommandAttributes
      • RequestCancelExternalWorkflowExecutionCommandAttributes
      • ScheduleActivityTaskCommandAttributes
      • SignalExternalWorkflowExecutionCommandAttributes
      • StartChildWorkflowExecutionCommandAttributes
      • StartTimerCommandAttributes
      • UpsertWorkflowSearchAttributesCommandAttributes
    • Temporalio.Api.Common.V1
      • ActivityType
      • DataBlob
      • GrpcStatus
      • GrpcStatusReflection
      • Header
      • Memo
      • MessageReflection
      • Payload
      • Payloads
      • RetryPolicy
      • SearchAttributes
      • WorkflowExecution
      • WorkflowType
    • Temporalio.Api.Dependencies.Gogoproto
      • GogoExtensions
      • GogoReflection
    • Temporalio.Api.Enums.V1
      • ArchivalState
      • BatchOperationReflection
      • BatchOperationState
      • BatchOperationType
      • CancelExternalWorkflowExecutionFailedCause
      • CommandType
      • CommandTypeReflection
      • CommonReflection
      • ContinueAsNewInitiator
      • EncodingType
      • EventType
      • EventTypeReflection
      • FailedCauseReflection
      • HistoryEventFilterType
      • IndexedValueType
      • InteractionType
      • InteractionTypeReflection
      • NamespaceReflection
      • NamespaceState
      • ParentClosePolicy
      • PendingActivityState
      • PendingWorkflowTaskState
      • QueryReflection
      • QueryRejectCondition
      • QueryResultType
      • ReplicationState
      • ResetReapplyType
      • ResetReflection
      • ResourceExhaustedCause
      • RetryState
      • ScheduleOverlapPolicy
      • ScheduleReflection
      • Severity
      • SignalExternalWorkflowExecutionFailedCause
      • StartChildWorkflowExecutionFailedCause
      • TaskQueueKind
      • TaskQueueReflection
      • TaskQueueType
      • TimeoutType
      • UpdateReflection
      • WorkflowExecutionStatus
      • WorkflowIdReusePolicy
      • WorkflowReflection
      • WorkflowTaskFailedCause
      • WorkflowUpdateResultAccessStyle
    • Temporalio.Api.ErrorDetails.V1
      • CancellationAlreadyRequestedFailure
      • ClientVersionNotSupportedFailure
      • MessageReflection
      • NamespaceAlreadyExistsFailure
      • NamespaceInvalidStateFailure
      • NamespaceNotActiveFailure
      • NamespaceNotFoundFailure
      • NotFoundFailure
      • PermissionDeniedFailure
      • QueryFailedFailure
      • ResourceExhaustedFailure
      • ServerVersionNotSupportedFailure
      • SystemWorkflowFailure
      • WorkflowExecutionAlreadyStartedFailure
      • WorkflowNotReadyFailure
    • Temporalio.Api.Failure.V1
      • ActivityFailureInfo
      • ApplicationFailureInfo
      • CanceledFailureInfo
      • ChildWorkflowExecutionFailureInfo
      • Failure
      • Failure.FailureInfoOneofCase
      • MessageReflection
      • ResetWorkflowFailureInfo
      • ServerFailureInfo
      • TerminatedFailureInfo
      • TimeoutFailureInfo
    • Temporalio.Api.Filter.V1
      • MessageReflection
      • StartTimeFilter
      • StatusFilter
      • WorkflowExecutionFilter
      • WorkflowTypeFilter
    • Temporalio.Api.History.V1
      • ActivityPropertiesModifiedExternallyEventAttributes
      • ActivityTaskCanceledEventAttributes
      • ActivityTaskCancelRequestedEventAttributes
      • ActivityTaskCompletedEventAttributes
      • ActivityTaskFailedEventAttributes
      • ActivityTaskScheduledEventAttributes
      • ActivityTaskStartedEventAttributes
      • ActivityTaskTimedOutEventAttributes
      • ChildWorkflowExecutionCanceledEventAttributes
      • ChildWorkflowExecutionCompletedEventAttributes
      • ChildWorkflowExecutionFailedEventAttributes
      • ChildWorkflowExecutionStartedEventAttributes
      • ChildWorkflowExecutionTerminatedEventAttributes
      • ChildWorkflowExecutionTimedOutEventAttributes
      • ExternalWorkflowExecutionCancelRequestedEventAttributes
      • ExternalWorkflowExecutionSignaledEventAttributes
      • History
      • HistoryEvent
      • HistoryEvent.AttributesOneofCase
      • MarkerRecordedEventAttributes
      • MessageReflection
      • RequestCancelExternalWorkflowExecutionFailedEventAttributes
      • RequestCancelExternalWorkflowExecutionInitiatedEventAttributes
      • SignalExternalWorkflowExecutionFailedEventAttributes
      • SignalExternalWorkflowExecutionInitiatedEventAttributes
      • StartChildWorkflowExecutionFailedEventAttributes
      • StartChildWorkflowExecutionInitiatedEventAttributes
      • TimerCanceledEventAttributes
      • TimerFiredEventAttributes
      • TimerStartedEventAttributes
      • UpsertWorkflowSearchAttributesEventAttributes
      • WorkflowExecutionCanceledEventAttributes
      • WorkflowExecutionCancelRequestedEventAttributes
      • WorkflowExecutionCompletedEventAttributes
      • WorkflowExecutionContinuedAsNewEventAttributes
      • WorkflowExecutionFailedEventAttributes
      • WorkflowExecutionSignaledEventAttributes
      • WorkflowExecutionStartedEventAttributes
      • WorkflowExecutionTerminatedEventAttributes
      • WorkflowExecutionTimedOutEventAttributes
      • WorkflowPropertiesModifiedEventAttributes
      • WorkflowPropertiesModifiedExternallyEventAttributes
      • WorkflowTaskCompletedEventAttributes
      • WorkflowTaskFailedEventAttributes
      • WorkflowTaskScheduledEventAttributes
      • WorkflowTaskStartedEventAttributes
      • WorkflowTaskTimedOutEventAttributes
      • WorkflowUpdateAcceptedEventAttributes
      • WorkflowUpdateCompletedEventAttributes
      • WorkflowUpdateRejectedEventAttributes
    • Temporalio.Api.Interaction.V1
      • Input
      • Invocation
      • MessageReflection
      • Meta
      • Output
      • Output.ResultOneofCase
    • Temporalio.Api.Namespace.V1
      • BadBinaries
      • BadBinaryInfo
      • MessageReflection
      • NamespaceConfig
      • NamespaceFilter
      • NamespaceInfo
      • UpdateNamespaceInfo
    • Temporalio.Api.OperatorService.V1
      • AddOrUpdateRemoteClusterRequest
      • AddOrUpdateRemoteClusterResponse
      • AddSearchAttributesRequest
      • AddSearchAttributesResponse
      • ClusterMetadata
      • DeleteNamespaceRequest
      • DeleteNamespaceResponse
      • ListClustersRequest
      • ListClustersResponse
      • ListSearchAttributesRequest
      • ListSearchAttributesResponse
      • RemoveRemoteClusterRequest
      • RemoveRemoteClusterResponse
      • RemoveSearchAttributesRequest
      • RemoveSearchAttributesResponse
      • RequestResponseReflection
      • ServiceReflection
    • Temporalio.Api.Query.V1
      • MessageReflection
      • QueryRejected
      • WorkflowQuery
      • WorkflowQueryResult
    • Temporalio.Api.Replication.V1
      • ClusterReplicationConfig
      • FailoverStatus
      • MessageReflection
      • NamespaceReplicationConfig
    • Temporalio.Api.Schedule.V1
      • BackfillRequest
      • CalendarSpec
      • IntervalSpec
      • MessageReflection
      • Range
      • Schedule
      • ScheduleAction
      • ScheduleAction.ActionOneofCase
      • ScheduleActionResult
      • ScheduleInfo
      • ScheduleListEntry
      • ScheduleListInfo
      • SchedulePatch
      • SchedulePolicies
      • ScheduleSpec
      • ScheduleState
      • StructuredCalendarSpec
      • TriggerImmediatelyRequest
    • Temporalio.Api.TaskQueue.V1
      • MessageReflection
      • PollerInfo
      • StickyExecutionAttributes
      • TaskIdBlock
      • TaskQueue
      • TaskQueueMetadata
      • TaskQueuePartitionMetadata
      • TaskQueueStatus
      • VersionId
      • VersionIdNode
    • Temporalio.Api.TestService.V1
      • GetCurrentTimeResponse
      • LockTimeSkippingRequest
      • LockTimeSkippingResponse
      • RequestResponseReflection
      • ServiceReflection
      • SleepRequest
      • SleepResponse
      • SleepUntilRequest
      • UnlockTimeSkippingRequest
      • UnlockTimeSkippingResponse
    • Temporalio.Api.Version.V1
      • Alert
      • MessageReflection
      • ReleaseInfo
      • VersionInfo
    • Temporalio.Api.Workflow.V1
      • MessageReflection
      • NewWorkflowExecutionInfo
      • PendingActivityInfo
      • PendingChildExecutionInfo
      • PendingWorkflowTaskInfo
      • ResetPointInfo
      • ResetPoints
      • WorkflowExecutionConfig
      • WorkflowExecutionInfo
    • Temporalio.Api.WorkflowService.V1
      • CountWorkflowExecutionsRequest
      • CountWorkflowExecutionsResponse
      • CreateScheduleRequest
      • CreateScheduleResponse
      • DeleteScheduleRequest
      • DeleteScheduleResponse
      • DeleteWorkflowExecutionRequest
      • DeleteWorkflowExecutionResponse
      • DeprecateNamespaceRequest
      • DeprecateNamespaceResponse
      • DescribeBatchOperationRequest
      • DescribeBatchOperationResponse
      • DescribeNamespaceRequest
      • DescribeNamespaceResponse
      • DescribeScheduleRequest
      • DescribeScheduleResponse
      • DescribeTaskQueueRequest
      • DescribeTaskQueueResponse
      • DescribeWorkflowExecutionRequest
      • DescribeWorkflowExecutionResponse
      • GetClusterInfoRequest
      • GetClusterInfoResponse
      • GetSearchAttributesRequest
      • GetSearchAttributesResponse
      • GetSystemInfoRequest
      • GetSystemInfoResponse
      • GetSystemInfoResponse.Types
      • GetSystemInfoResponse.Types.Capabilities
      • GetWorkerBuildIdOrderingRequest
      • GetWorkerBuildIdOrderingResponse
      • GetWorkflowExecutionHistoryRequest
      • GetWorkflowExecutionHistoryResponse
      • GetWorkflowExecutionHistoryReverseRequest
      • GetWorkflowExecutionHistoryReverseResponse
      • ListArchivedWorkflowExecutionsRequest
      • ListArchivedWorkflowExecutionsResponse
      • ListBatchOperationsRequest
      • ListBatchOperationsResponse
      • ListClosedWorkflowExecutionsRequest
      • ListClosedWorkflowExecutionsRequest.FiltersOneofCase
      • ListClosedWorkflowExecutionsResponse
      • ListNamespacesRequest
      • ListNamespacesResponse
      • ListOpenWorkflowExecutionsRequest
      • ListOpenWorkflowExecutionsRequest.FiltersOneofCase
      • ListOpenWorkflowExecutionsResponse
      • ListScheduleMatchingTimesRequest
      • ListScheduleMatchingTimesResponse
      • ListSchedulesRequest
      • ListSchedulesResponse
      • ListTaskQueuePartitionsRequest
      • ListTaskQueuePartitionsResponse
      • ListWorkflowExecutionsRequest
      • ListWorkflowExecutionsResponse
      • PatchScheduleRequest
      • PatchScheduleResponse
      • PollActivityTaskQueueRequest
      • PollActivityTaskQueueResponse
      • PollWorkflowTaskQueueRequest
      • PollWorkflowTaskQueueResponse
      • QueryWorkflowRequest
      • QueryWorkflowResponse
      • RecordActivityTaskHeartbeatByIdRequest
      • RecordActivityTaskHeartbeatByIdResponse
      • RecordActivityTaskHeartbeatRequest
      • RecordActivityTaskHeartbeatResponse
      • RegisterNamespaceRequest
      • RegisterNamespaceResponse
      • RequestCancelWorkflowExecutionRequest
      • RequestCancelWorkflowExecutionResponse
      • RequestResponseReflection
      • ResetStickyTaskQueueRequest
      • ResetStickyTaskQueueResponse
      • ResetWorkflowExecutionRequest
      • ResetWorkflowExecutionResponse
      • RespondActivityTaskCanceledByIdRequest
      • RespondActivityTaskCanceledByIdResponse
      • RespondActivityTaskCanceledRequest
      • RespondActivityTaskCanceledResponse
      • RespondActivityTaskCompletedByIdRequest
      • RespondActivityTaskCompletedByIdResponse
      • RespondActivityTaskCompletedRequest
      • RespondActivityTaskCompletedResponse
      • RespondActivityTaskFailedByIdRequest
      • RespondActivityTaskFailedByIdResponse
      • RespondActivityTaskFailedRequest
      • RespondActivityTaskFailedResponse
      • RespondQueryTaskCompletedRequest
      • RespondQueryTaskCompletedResponse
      • RespondWorkflowTaskCompletedRequest
      • RespondWorkflowTaskCompletedResponse
      • RespondWorkflowTaskFailedRequest
      • RespondWorkflowTaskFailedResponse
      • ScanWorkflowExecutionsRequest
      • ScanWorkflowExecutionsResponse
      • ServiceReflection
      • SignalWithStartWorkflowExecutionRequest
      • SignalWithStartWorkflowExecutionResponse
      • SignalWorkflowExecutionRequest
      • SignalWorkflowExecutionResponse
      • StartBatchOperationRequest
      • StartBatchOperationRequest.OperationOneofCase
      • StartBatchOperationResponse
      • StartWorkflowExecutionRequest
      • StartWorkflowExecutionResponse
      • StopBatchOperationRequest
      • StopBatchOperationResponse
      • TerminateWorkflowExecutionRequest
      • TerminateWorkflowExecutionResponse
      • UpdateNamespaceRequest
      • UpdateNamespaceResponse
      • UpdateScheduleRequest
      • UpdateScheduleResponse
      • UpdateWorkerBuildIdOrderingRequest
      • UpdateWorkerBuildIdOrderingResponse
      • UpdateWorkflowRequest
      • UpdateWorkflowResponse
    • Temporalio.Client
      • IBridgeClientProvider
      • ITemporalClient
      • ITemporalClientExtensions
      • ITemporalConnection
      • OperatorService
      • OperatorService.Impl
      • RpcOptions
      • RpcRetryOptions
      • RpcService
      • TemporalClient
      • TemporalClientConnectOptions
      • TemporalClientOptions
      • TemporalConnection
      • TemporalConnectionOptions
      • TestService
      • TestService.Impl
      • TlsOptions
      • WorkflowCancelOptions
      • WorkflowDescribeOptions
      • WorkflowQueryOptions
      • WorkflowService
      • WorkflowService.Impl
      • WorkflowSignalOptions
      • WorkflowStartOptions
      • WorkflowTerminateOptions
    • Temporalio.Client.Interceptors
      • ClientOutboundInterceptor
      • IClientInterceptor
    • Temporalio.Converters
      • BinaryNullConverter
      • BinaryPlainConverter
      • BinaryProtoConverter
      • ConverterExtensions
      • DefaultFailureConverter
      • DefaultFailureConverterOptions
      • DefaultPayloadConverter
      • IEncodingConverter
      • IFailureConverter
      • IPayloadConverter
      • JsonPlainConverter
      • JsonProtoConverter
      • PayloadCodecExtensions
      • WithEncodedCommonAttributes
    • Temporalio.Exceptions
      • ActivityFailureException
      • ApplicationFailureException
      • CancelledFailureException
      • ChildWorkflowFailureException
      • FailureException
      • IFailureDetails
      • RpcException
      • RpcException.StatusCode
      • ServerFailureException
      • TemporalException
      • TerminatedFailureException
      • TimeoutFailureException
      • WorkflowAlreadyStartedException
      • WorkflowContinuedAsNewException
      • WorkflowFailedException
      • WorkflowQueryFailedException
      • WorkflowQueryRejectedException
    • Temporalio.Runtime
      • LoggingOptions
      • MetricsOptions
      • OpenTelemetryOptions
      • PrometheusOptions
      • TelemetryFilterOptions
      • TelemetryFilterOptions.Level
      • TelemetryOptions
      • TemporalRuntime
      • TemporalRuntimeOptions
      • TracingOptions
    • Temporalio.Testing
      • TemporaliteOptions
      • TestServerOptions
      • WorkflowEnvironment
      • WorkflowEnvironmentStartLocalOptions
      • WorkflowEnvironmentStartTimeSkippingOptions
    • Temporalio.Worker
      • IWorkerClient
    • Temporalio.Worker.Interceptors
      • IWorkerInterceptor
    • Temporalio.Workflow
      • WorkflowAttribute
      • WorkflowInitAttribute
      • WorkflowQueryAttribute
      • WorkflowRunAttribute
      • WorkflowSignalAttribute

    Class ConverterExtensions

    Extensions for data, payload, and encoding converters.

    Inheritance
    Object
    ConverterExtensions
    Namespace: Temporalio.Converters
    Assembly: Temporalio.dll
    Syntax
    public static class ConverterExtensions : object

    Methods

    ToExceptionAsync(DataConverter, Failure)

    Decode and convert the given failure to an exception. Note, the failure object may be mutated in place so callers should clone to avoid side effects.

    Declaration
    public static Task<Exception> ToExceptionAsync(this DataConverter converter, Failure failure)
    Parameters
    Type Name Description
    DataConverter converter

    Converter to use.

    Failure failure

    Failure to convert and encode. This may be mutated.

    Returns
    Type Description
    Task<Exception>

    Decoded and converted exception.

    ToPayloadAsync(DataConverter, Nullable<Object>)

    Convert and encode the given value to a payload.

    Declaration
    public static Task<Payload> ToPayloadAsync(this DataConverter converter, object? value)
    Parameters
    Type Name Description
    DataConverter converter

    Converter to use.

    Nullable<Object> value

    Value to convert and encode.

    Returns
    Type Description
    Task<Payload>

    Converted and encoded payload.

    ToPayloadsAsync(DataConverter, IReadOnlyCollection<Nullable<Object>>)

    Convert and encode the given values to payloads.

    Declaration
    public static Task<IEnumerable<Payload>> ToPayloadsAsync(this DataConverter converter, IReadOnlyCollection<object?> values)
    Parameters
    Type Name Description
    DataConverter converter

    Converter to use.

    IReadOnlyCollection<Nullable<Object>> values

    Values to convert and encode.

    Returns
    Type Description
    Task<IEnumerable<Payload>>

    Converted and encoded payloads.

    ToSearchAttributesProto(IReadOnlyCollection<KeyValuePair<String, Object>>)

    Use the default payload converter to convert attribute values to search attributes.

    Declaration
    public static SearchAttributes ToSearchAttributesProto(this IReadOnlyCollection<KeyValuePair<string, object>> attrs)
    Parameters
    Type Name Description
    IReadOnlyCollection<KeyValuePair<String, Object>> attrs

    Attributes to convert.

    Returns
    Type Description
    SearchAttributes

    Protobuf search attributes.

    ToSearchAttributeValues(IEnumerable<KeyValuePair<String, Payload>>)

    Use the default payload converter to convert payloads to search attribute values.

    Declaration
    public static IDictionary<string, object> ToSearchAttributeValues(this IEnumerable<KeyValuePair<string, Payload>> payloads)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<String, Payload>> payloads

    Payloads to convert.

    Returns
    Type Description
    IDictionary<String, Object>

    Converted values.

    ToSearchAttributeValues(SearchAttributes)

    Use the default payload converter to convert payloads to search attribute values.

    Declaration
    public static IDictionary<string, object> ToSearchAttributeValues(this SearchAttributes payloads)
    Parameters
    Type Name Description
    SearchAttributes payloads

    Payloads to convert.

    Returns
    Type Description
    IDictionary<String, Object>

    Converted values.

    ToSingleValueAsync<T>(DataConverter, IReadOnlyCollection<Payload>)

    Decode and convert the given payloads to a single value.

    Declaration
    public static Task<T> ToSingleValueAsync<T>(this DataConverter converter, IReadOnlyCollection<Payload> payloads)
    Parameters
    Type Name Description
    DataConverter converter

    Converter to use.

    IReadOnlyCollection<Payload> payloads

    Payloads to decode and convert.

    Returns
    Type Description
    Task<T>

    Decoded and converted value.

    Type Parameters
    Name Description
    T

    Type to convert to.

    ToValue<T>(IPayloadConverter, Payload)

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

    Declaration
    public static T ToValue<T>(this IPayloadConverter converter, Payload payload)
    Parameters
    Type Name Description
    IPayloadConverter converter

    The converter to use.

    Payload payload

    The payload to convert.

    Returns
    Type Description
    T

    The converted value.

    Type Parameters
    Name Description
    T

    Value type.

    ToValueAsync<T>(DataConverter, Payload)

    Decode and convert the given payload to a value of the given type.

    Declaration
    public static Task<T> ToValueAsync<T>(this DataConverter converter, Payload payload)
    Parameters
    Type Name Description
    DataConverter converter

    The converter to use.

    Payload payload

    The payload to convert.

    Returns
    Type Description
    Task<T>

    Decoded and converted value.

    Type Parameters
    Name Description
    T

    Value type.

    Remarks

    Usually ToSingleValueAsync<T>(DataConverter, IReadOnlyCollection<Payload>) is better because an encoder could have encoded into multiple payloads. However for some maps like memos and headers, there may only be a single payload to decode.

    In This Article
    Back to top