17 lines
711 B
C#
17 lines
711 B
C#
namespace Svrnty.CQRS.Events.Abstractions.Correlation;
|
|
|
|
/// <summary>
|
|
/// Optional interface for commands that are part of a multi-step workflow/saga.
|
|
/// Implement this to provide a correlation ID that links multiple commands together.
|
|
/// If CorrelationId is provided, the framework will use it instead of generating a new one.
|
|
/// </summary>
|
|
public interface ICorrelatedCommand
|
|
{
|
|
/// <summary>
|
|
/// Optional correlation ID to link this command with previous commands/events.
|
|
/// If null or empty, the framework will generate a new correlation ID.
|
|
/// If provided, this correlation ID will be used for all events emitted by this command.
|
|
/// </summary>
|
|
string? CorrelationId { get; }
|
|
}
|