SimpleCommandMessage
Simple implementation of CommandMessage with default values for most properties. This class provides a convenient way to create command messages with sensible defaults.
Parameters
The type of the command body.
Unique identifier for the command message. Defaults to a generated global ID.
Message header containing metadata. Defaults to an empty header.
The actual command payload.
Identifier of the aggregate this command targets.
Identifier of the owner/user initiating the command. Defaults to default owner.
Identifier for request deduplication. Defaults to the message ID.
Expected version of the aggregate for optimistic concurrency. Null means no version check.
Human-readable name of the command. Defaults to the simple class name of the body.
Whether this command creates a new aggregate instance.
Whether creation is allowed if the aggregate doesn't exist.
Whether this is a void command that doesn't produce events.
Timestamp when the command was created. Defaults to current time.
Constructors
Properties
Functions
Creates an AggregateId for this NamedAggregate with the specified parameters.
Finds the aggregate type class associated with this named aggregate.
Converts this NamedAggregate to its corresponding AggregateMetadata.
Creates a copy of this command message with a deep copy of the header. This ensures header modifications don't affect the original message.
Ensures the command message has a trace ID, using its own ID if none exists.
Generates a unique ID string for this NamedAggregate.
Gets the context alias prefix for this bounded context.
Checks if the named aggregate is available locally at runtime.
Checks if this message matches the given function for compensation purposes.
Materializes this NamedAggregate into a MaterializedNamedAggregate.
Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.
Extension function to convert a NamedAggregate to an EventNamedAggregate.
Computes a grouping key for parallel processing based on the aggregate ID.
Converts this NamedAggregate to its string representation.
Converts this NamedAggregate to a string representation using the context alias.