Executes a query through its registered handler.
The query to execute
The result from the query handler
Checks if a handler is registered for a query type.
The query class constructor
True if a handler is registered
Unregisters a query handler.
The query class constructor
True if a handler was unregistered
Clears all registered handlers.
In-memory query bus implementation.
Provides a simple, synchronous query bus for handling queries. Each query type can have only one handler.
Example