Class ISerializationContext.Nexus
- Namespace
- Temporalio.Converters
- Assembly
- Temporalio.dll
Serialization context for Nexus operation payloads, identifying the Nexus endpoint, service, and resolved operation the payload belongs to. See WithSerializationContext(ISerializationContext) for information on when this is made available to converters and codecs.
public sealed record ISerializationContext.Nexus : ISerializationContext, IEquatable<ISerializationContext.Nexus>
- Inheritance
-
ISerializationContext.Nexus
- Implements
- Inherited Members
Remarks
Callers receive this context when encoding operation inputs and when decoding operation results and failures. Handlers receive it when decoding operation inputs, encoding synchronous operation results, and encoding failures produced while handling a Nexus task.
The context is not propagated to the eventual result of an asynchronous operation, because the operation is completed out of band rather than by the task the handler was invoked for.
Failure conversion is not symmetric: a failure is encoded by the handler and decoded by the caller, so an implementation sees this context on only one side of a given failure, and for some operation paths it sees no context at all. Context-dependent encodings must therefore be self-describing, and decoders must keep accepting payloads that were encoded without a context.
WARNING: This API is experimental and may change in the future.
WARNING: This constructor may have required properties added and is not guaranteed to remain compatible from one version to the next.
Constructors
Nexus(string, string, string)
Serialization context for Nexus operation payloads, identifying the Nexus endpoint, service, and resolved operation the payload belongs to. See WithSerializationContext(ISerializationContext) for information on when this is made available to converters and codecs.
public Nexus(string Endpoint, string Service, string Operation)
Parameters
EndpointstringNexus endpoint name.
ServicestringNexus service name.
OperationstringResolved Nexus operation name.
Remarks
Callers receive this context when encoding operation inputs and when decoding operation results and failures. Handlers receive it when decoding operation inputs, encoding synchronous operation results, and encoding failures produced while handling a Nexus task.
The context is not propagated to the eventual result of an asynchronous operation, because the operation is completed out of band rather than by the task the handler was invoked for.
Failure conversion is not symmetric: a failure is encoded by the handler and decoded by the caller, so an implementation sees this context on only one side of a given failure, and for some operation paths it sees no context at all. Context-dependent encodings must therefore be self-describing, and decoders must keep accepting payloads that were encoded without a context.
WARNING: This API is experimental and may change in the future.
WARNING: This constructor may have required properties added and is not guaranteed to remain compatible from one version to the next.
Properties
Endpoint
Nexus endpoint name.
public string Endpoint { get; init; }
Property Value
Operation
Resolved Nexus operation name.
public string Operation { get; init; }
Property Value
Service
Nexus service name.
public string Service { get; init; }