feat(dispatcher): add registration-time pipeline behavior ordering via AddBehavior<T>(order:)
All checks were successful
default / dotnet-default-workflow (push) Successful in 1m58s
All checks were successful
default / dotnet-default-workflow (push) Successful in 1m58s
Pipeline behavior ordering previously depended on discovery/registration order. Add an AddBehavior<T>(order:) API that captures the order at registration time; the BehaviorTypeIndex now orders matching behaviors by that explicit order (lower runs first), falling back to registration order for ties. Removed the runtime Order property approach.
This commit is contained in:
parent
595ba01ea6
commit
ae2c2679f2
7 changed files with 143 additions and 17 deletions
|
|
@ -56,6 +56,7 @@ To have a consistent experience across all packages, some public interfaces have
|
|||
- **request.validation:** Make `Severity` meaningful — `Validation.IsValid` now only fails on `Error` problems; `Warning`/`Info` no longer invalidate. Added `Validation.IsValidFor(Severity)` to set the failing-severity threshold (see PLAN.md Inconsistencies#B)
|
||||
- **request.dispatcher:** Throw `InvalidOperationException` listing candidates when multiple handlers match a request instead of silently resolving via `.First()` (matches MediatR). Also throws when no handler is registered (see PLAN.md Inconsistencies#C)
|
||||
- **request.dispatcher:** Resolve handlers/behaviors in registration order across closed and open generics instead of the fixed closed-before-open reflection order (see PLAN.md Inconsistencies#D)
|
||||
- **request.dispatcher:** Add `AddBehavior<T>(order:)` registration-time API so pipeline behavior ordering is explicit and deterministic (lower order runs first, registration order as tie-break) instead of relying on reflection/discovery order (see PLAN.md Tips — Explicit pipeline ordering API)
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue