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.

◆ GetHandlers< TMessage >()

IEnumerable<RouteHandlerDelegate> Cqrs.Bus.RouteManager.GetHandlers< TMessage > ( TMessage  message,
bool  throwExceptionOnNoRouteHandlers = true 
)

Gets the collection RouteHandlerDelegate that are expected for handling TMessage .

Template Parameters
TMessageThe Type of IMessage to find a RouteHandlerDelegate for.
Parameters
messageThe TMessage to find a RouteHandlerDelegate for.
throwExceptionOnNoRouteHandlersIf true will throw an Exception if no RouteHandlerDelegate found.
Exceptions
NoCommandHandlerRegisteredExceptionIf no RouteHandlerDelegate is found and TMessage is an ICommand<TAuthenticationToken> and throwExceptionOnNoRouteHandlers is true.
NoEventHandlerRegisteredExceptionIf no RouteHandlerDelegate is found and TMessage is an IEvent<TAuthenticationToken> and throwExceptionOnNoRouteHandlers is true.
NoHandlerRegisteredExceptionIf no RouteHandlerDelegate is found and TMessage is not either an ICommand<TAuthenticationToken> or an IEvent<TAuthenticationToken> and throwExceptionOnNoRouteHandlers is true.
Type Constraints
TMessage :IMessage