How ugurozturk/uo.mediator works
UO.Mediator is a .NET request-dispatch library with an optional compile-time API controller generator. Its main workflow is a caller dispatching a request, the runtime resolving its handler and behaviors, then executing the ordered pipeline. Registration and startup graph validation support that runtime; shared contracts define its public interfaces. The README also documents annotated-request API generation. The excerpts show runtime dispatch and pipeline internals, but not generated controller execution, so no edge from generated endpoints into runtime dispatch is asserted.
Main entry points: RequestDispatcher.cs Request dispatcher · UOMediatorServiceCollectionExtensions.cs DI registration · RequestPipelineCache.cs Ordered pipeline · RequestLoggingBehavior.cs Request logging
Components 14
Contracts
- Request contracts
src/UO.Mediator.Shared/RequestContracts.cs
Dispatch runtime
- DI registration
src/UO.Mediator/UOMediatorServiceCollectionExtensions.cs - Request dispatcher
src/UO.Mediator/Dispatching/RequestDispatcher.cs - Request handler
- Graph validator
src/UO.Mediator/Dispatching/RequestGraphValidator.cs
Pipeline features
- Request behaviors
- Ordered pipeline
src/UO.Mediator/Dispatching/RequestPipelineCache.cs - Pipeline cache
src/UO.Mediator/Dispatching/RequestPipelineCache.cs - Request logging
src/UO.Mediator/Dispatching/RequestLoggingBehavior.cs - Logging options
src/UO.Mediator/Dispatching/RequestLoggingOptions.cs
API generation
- API metadata
src/UO.Mediator/ApiExplorer/MediatorApiExplorerAttribute.cs - Controller generator
src/UO.Mediator.ApiExplorer/MediatorApiExplorerGenerator.cs - Generated API surface
src/UO.Mediator.ApiExplorer/MediatorApiExplorerGenerator.cs
Other components
- Application caller
Connections 16
- Application caller → Request dispatcher: dispatches request
README.md - DI registration → Request dispatcher: registers
src/UO.Mediator/UOMediatorServiceCollectionExtensions.cs - DI registration → Graph validator: registers
src/UO.Mediator/UOMediatorServiceCollectionExtensions.cs - DI registration → Pipeline cache: registers
src/UO.Mediator/UOMediatorServiceCollectionExtensions.cs - DI registration → Request logging: registers optionally
src/UO.Mediator/UOMediatorServiceCollectionExtensions.cs - Request dispatcher → Request handler: resolves
src/UO.Mediator/Dispatching/RequestDispatcher.cs - Request dispatcher → Request behaviors: resolves
src/UO.Mediator/Dispatching/RequestDispatcher.cs - Request dispatcher → Pipeline cache: gets pipeline
src/UO.Mediator/Dispatching/RequestDispatcher.cs - Pipeline cache → Ordered pipeline: creates and caches
src/UO.Mediator/Dispatching/RequestPipelineCache.cs - Ordered pipeline → Request behaviors: executes in order
src/UO.Mediator/Dispatching/RequestPipelineCache.cs - Ordered pipeline → Request handler: invokes
src/UO.Mediator/Dispatching/RequestPipelineCache.cs - Request logging → Ordered pipeline: continues dispatch
src/UO.Mediator/Dispatching/RequestLoggingBehavior.cs - Request logging → Logging options: reads threshold
src/UO.Mediator/Dispatching/RequestLoggingBehavior.cs - Graph validator → Request handler: checks resolution
src/UO.Mediator/Dispatching/RequestGraphValidator.cs - API metadata → Controller generator: supplies metadata
src/UO.Mediator.ApiExplorer/MediatorApiExplorerGenerator.cs - Controller generator → Generated API surface: generates endpoints
README.md