CQRS.NET  4.0
A lightweight enterprise Function as a Service (FaaS) framework to write function based serverless and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.Bus.RouteManager Class Reference

Manages routes. More...

+ Inheritance diagram for Cqrs.Bus.RouteManager:

Public Member Functions

 RouteManager ()
 Instantiates a new instance of RouteManager. More...
 
virtual void RegisterHandler< TMessage > (Action< TMessage > handler, Type targetedType, bool holdMessageLock=true)
 Register an event or command handler that will listen and respond to events or commands. More...
 
void RegisterHandler< TMessage > (Action< TMessage > handler, bool holdMessageLock=true)
 Register an event or command handler that will listen and respond to events or commands. More...
 
void RegisterGlobalEventHandler< TMessage > (Action< TMessage > handler, bool holdMessageLock=true)
 Register an event handler that will listen and respond to all events. More...
 
RouteHandlerDelegate GetSingleHandler< TMessage > (bool throwExceptionOnNoRouteHandlers=true)
 Gets the single RouteHandlerDelegate expected for handling TMessage . More...
 
RouteHandlerDelegate GetSingleHandler< TMessage > (TMessage message, bool throwExceptionOnNoRouteHandlers=true)
 Gets the single RouteHandlerDelegate expected for handling TMessage . More...
 
IEnumerable< RouteHandlerDelegateGetHandlers< TMessage > (TMessage message, bool throwExceptionOnNoRouteHandlers=true)
 Gets the collection RouteHandlerDelegate that are expected for handling TMessage . More...
 

Protected Member Functions

virtual bool IsACommand< TMessage > (TMessage message)
 Checks if the provided message is an ICommand<TAuthenticationToken>. More...
 
virtual bool IsACommand (Type messageType)
 Checks if the provided messageType implements ICommand<TAuthenticationToken>. More...
 
virtual bool IsAnEvent< TMessage > (TMessage message)
 Checks if the provided message is an IEvent<TAuthenticationToken>. More...
 
virtual bool IsAnEvent (Type messageType)
 Checks if the provided messageType implements IEvent<TAuthenticationToken>. More...
 

Properties

IDictionary< Type, RouteRoutes [get]
 The Route to execute per Type More...
 
Route GlobalEventRoute [get]
 A Route to execute for all IEvent<TAuthenticationToken> More...
 

Detailed Description

Manages routes.