Class ChoreographySagaExecutionStrategy
Namespace: Cephalon.Behaviors.Patterns.Strategies
Assembly: Cephalon.Behaviors.Patterns.dll
Executes behaviors that follow the choreography-based saga pattern.
Publications returned by the behavior are staged through
public sealed class ChoreographySagaExecutionStrategy : IBehaviorExecutionStrategyInheritance
Section titled “Inheritance”object ← ChoreographySagaExecutionStrategy
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”ChoreographySagaExecutionStrategy(ISagaChoreographyPublisher, ILogger<ChoreographySagaExecutionStrategy>, ISagaChoreographyPublicationRuntimeStateCatalog?)
Section titled “ ChoreographySagaExecutionStrategy(ISagaChoreographyPublisher, ILogger<ChoreographySagaExecutionStrategy>, ISagaChoreographyPublicationRuntimeStateCatalog?)”Initializes a new instance of
public ChoreographySagaExecutionStrategy(ISagaChoreographyPublisher publisher, ILogger<ChoreographySagaExecutionStrategy> logger, ISagaChoreographyPublicationRuntimeStateCatalog? runtimeStateCatalog = null)Parameters
Section titled “Parameters”publisher ISagaChoreographyPublisher
The publisher used to stage choreography publications.
logger ILogger<ChoreographySagaExecutionStrategy>
The logger used to report accepted publications.
runtimeStateCatalog ISagaChoreographyPublicationRuntimeStateCatalog?
An optional runtime-state catalog that can also accept operator-facing live publication observations for choreography execution.
Properties
Section titled “Properties”Pattern
Section titled “ Pattern”Gets the pattern identifier handled by this strategy.
public string Pattern { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ExecuteAsync(BehaviorExecutionContext, CancellationToken)
Section titled “ ExecuteAsync(BehaviorExecutionContext, CancellationToken)”Invokes the behavior and stages any returned publications through the choreography publisher.
Behaviors may return a single
public Task<BehaviorExecutionResult> ExecuteAsync(BehaviorExecutionContext context, CancellationToken ct = default)Parameters
Section titled “Parameters”context BehaviorExecutionContext
The execution context for this invocation.
A token that cancels the execution.
Returns
Section titled “Returns”A result with HTTP 202 when at least one publication is staged; otherwise HTTP 200 or 204 based on whether the behavior produced a local output.