Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH-263] Allow command handlers to consume query handlers #15

Merged
merged 5 commits into from
Mar 16, 2023

Conversation

asimmon
Copy link
Member

@asimmon asimmon commented Mar 11, 2023

The rule GMDTR09 "Handlers should not call other handlers" is a bit too strict right now. It prevent command handlers from consuming query handlers. This PR allows this behavior.

Added more tests to validate the following behaviors:

  • Notification handlers can be called from any handler
  • Command handlers can call query handlers
  • Command handlers cannot call other command handlers
  • Query handlers cannot call command handlers
  • Query handlers cannot call other query handlers

@asimmon asimmon requested a review from a team as a code owner March 11, 2023 02:00
Base automatically changed from feature/roslyn-testing-framework to main March 15, 2023 14:05
# Conflicts:
#	src/GSoft.Extensions.MediatR.Analyzers.Tests/SemanticDesignAnalyzerTests.cs
@asimmon asimmon changed the title Allow command handlers to consume query handlers [TECH-263] Allow command handlers to consume query handlers Mar 15, 2023
Co-authored-by: Guillaume Caya-Letourneau <guillaume.caya.letourneau@gmail.com>
@asimmon asimmon requested a review from Gcaya March 16, 2023 18:44
@asimmon asimmon merged commit b9543e7 into main Mar 16, 2023
@asimmon asimmon deleted the feature/command-can-call-query branch March 16, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants