v2/feature/ #141 : Cortex.Mediator - Add Non Returning Command Interface (ICommand) - #142
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v2/feature/ #141: Cortex.Mediator - Add Non-Returning Command Interface (ICommand)
Add support for non-returning CQRS commands
Introduced a non-generic
ICommandinterface for commands that do not return values, alongside a correspondingICommandHandler<TCommand>interface. AddedICommandPipelineBehavior<TCommand>andCommandHandlerDelegateto enable pipeline behaviors for non-returning commands.Updated
MediatorOptionsto manage both returning and non-returning command behaviors, including the addition ofVoidCommandBehaviors. EnhancedMediatorOptionsExtensionsandServiceCollectionExtensionsto register default and custom behaviors for non-returning commands.Extended
IMediatorwith aSendCommandAsync<TCommand>method for non-returning commands. Updated theMediatorimplementation to handle non-returning commands and added aPipelineBehaviorNextDelegate<TCommand>for behavior chaining.Added
VoidLoggingCommandBehaviorto log execution details for non-returning commands. Refactored existing code to ensure compatibility with the new non-returning command infrastructure.