Improves mediator and middelware documentation#9579
Merged
PascalSenn merged 2 commits intomainfrom Apr 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Mocha Mediator pipeline/middleware documentation and aligns the MediatorShowcase example code (and its source-generated registration) with the simplified middleware style and updated generator output.
Changes:
- Simplifies the middleware logging example to use
async/awaitand removes the documentation section on the synchronous fast-path optimization. - Updates MediatorShowcase pipeline behaviors to the same
async/awaitpattern and removes now-unusedSystem.Runtime.CompilerServicesusings. - Regenerates the MediatorShowcase DI extension to register handlers via
AddHandlerConfiguration(...)withPipelineBuilder.Build*Pipeline(...)delegates.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/src/docs/mocha/v16/mediator/pipeline-and-middleware.md | Simplifies middleware example and removes the sync fast-path optimization section. |
| src/Mocha/src/Examples/MediatorShowcase/PipelineBehaviors.cs | Converts showcase middleware to async/await and removes fast-path/local helper patterns. |
| src/Mocha/src/Examples/MediatorShowcase/MediatorShowcase.cs | Removes an unused using directive. |
| src/Mocha/src/Examples/MediatorShowcase/Generated/Mocha.Analyzers/Mocha.Analyzers.MediatorGenerator/MediatorShowcaseMediatorBuilderExtensions._5hYhW_IBO7W3L_MSoxCPw.g.cs | Updates generated registration to add handler configurations and pipeline delegates per handler. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 1, 2026
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.
No description provided.