Skip to content

v2/feature/ #141 : Cortex.Mediator - Add Non Returning Command Interface (ICommand) - #142

Merged
eneshoxha merged 1 commit into
v2.0/releasefrom
v2/feature/141
Oct 9, 2025
Merged

v2/feature/ #141 : Cortex.Mediator - Add Non Returning Command Interface (ICommand)#142
eneshoxha merged 1 commit into
v2.0/releasefrom
v2/feature/141

Conversation

@eneshoxha

Copy link
Copy Markdown
Contributor

v2/feature/ #141: Cortex.Mediator - Add Non-Returning Command Interface (ICommand)

Add support for non-returning CQRS commands

Introduced a non-generic ICommand interface for commands that do not return values, alongside a corresponding ICommandHandler<TCommand> interface. Added ICommandPipelineBehavior<TCommand> and CommandHandlerDelegate to enable pipeline behaviors for non-returning commands.

Updated MediatorOptions to manage both returning and non-returning command behaviors, including the addition of VoidCommandBehaviors. Enhanced MediatorOptionsExtensions and ServiceCollectionExtensions to register default and custom behaviors for non-returning commands.

Extended IMediator with a SendCommandAsync<TCommand> method for non-returning commands. Updated the Mediator implementation to handle non-returning commands and added a PipelineBehaviorNextDelegate<TCommand> for behavior chaining.

Added VoidLoggingCommandBehavior to log execution details for non-returning commands. Refactored existing code to ensure compatibility with the new non-returning command infrastructure.

…e (ICommand)

Add support for non-returning CQRS commands

Introduced a non-generic `ICommand` interface for commands that do not return values, alongside a corresponding `ICommandHandler<TCommand>` interface. Added `ICommandPipelineBehavior<TCommand>` and `CommandHandlerDelegate` to enable pipeline behaviors for non-returning commands.

Updated `MediatorOptions` to manage both returning and non-returning command behaviors, including the addition of `VoidCommandBehaviors`. Enhanced `MediatorOptionsExtensions` and `ServiceCollectionExtensions` to register default and custom behaviors for non-returning commands.

Extended `IMediator` with a `SendCommandAsync<TCommand>` method for non-returning commands. Updated the `Mediator` implementation to handle non-returning commands and added a `PipelineBehaviorNextDelegate<TCommand>` for behavior chaining.

Added `VoidLoggingCommandBehavior` to log execution details for non-returning commands. Refactored existing code to ensure compatibility with the new non-returning command infrastructure.
@eneshoxha eneshoxha added this to the Cortex v2.0 milestone Oct 8, 2025
@eneshoxha eneshoxha self-assigned this Oct 8, 2025
@eneshoxha eneshoxha added enhancement New feature or request feature This label is in use for minor version increments labels Oct 8, 2025
@eneshoxha
eneshoxha merged commit cf8b950 into v2.0/release Oct 9, 2025
@eneshoxha
eneshoxha deleted the v2/feature/141 branch October 9, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature This label is in use for minor version increments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Cortex.Mediator - Add Non Returning Command Interface (ICommand)

1 participant