Skip to content

docs: add recipes page and migration warnings - #20

Merged
illia1f merged 1 commit into
mainfrom
docs/recipes-and-migration-notes
Nov 10, 2026
Merged

illia1f merged 1 commit into
mainfrom
docs/recipes-and-migration-notes

Conversation

@illia1f

@illia1f illia1f commented Nov 10, 2026

Copy link
Copy Markdown
Owner

The migration guide told readers to implement processors, exception handlers, and untyped send as stages without showing the code. docs/recipes.md has a compiled sample for each, and the guide warns about three migration traps.

  • docs/recipes.md: pre and post processing, exception handling, FluentValidation, ActivitySource tracing, an untyped send adapter, and dispatch from a hosted service.
  • docs/migrating-from-mediatr.md:
    • A Task<Unit> handler ports to IRequestHandler<TRequest>. Ported as IRequestHandler<TRequest, NoResult>, void-form stages skip it in 1.0.
    • Dispatchers and the publisher are scoped by default, so a singleton cannot inject one directly.
    • An open stage whose response wraps a type parameter, or that declares more than two, reports RF0012. Constrain TResponse or register it closed.
    • Links to the matching recipes.
  • docs/lifetimes.md: copied service collections share one registry, so AddRequestFlow on a second copy skips assemblies the first already scanned and dispatch fails with "No service for type".
  • README lists the Recipes page.

Validation:

  • Every code block in recipes.md was extracted verbatim, compiled with no warnings against the published RequestFlow 1.0.0 package, and run through a real ServiceCollection.
  • The tracing recipe builds on netstandard2.0 and net462 only with System.Diagnostics.DiagnosticSource referenced.
  • The migration and lifetimes claims were each reproduced against 1.0.0.
  • All relative doc links resolve. git diff --check: passed.
  • No source changed. dotnet build and dotnet test were not run locally; ci-validation covers them.

@illia1f
illia1f merged commit db765cb into main Nov 10, 2026
1 check passed
@illia1f
illia1f deleted the docs/recipes-and-migration-notes branch November 10, 2026 19:14
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.

1 participant