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.Configuration.BusRegistrar Class Reference

Triggers the IEventHandlerRegistrar and ICommandHandlerRegistrar if they are registered in the IDependencyResolver. More...

+ Inheritance diagram for Cqrs.Configuration.BusRegistrar:

Classes

class  HandlerTypeInformation
 Information explaining the registration to make More...
 

Public Member Functions

 BusRegistrar (IDependencyResolver dependencyResolver)
 Instantiates a new instance of BusRegistrar. More...
 
virtual void Register (params Type[] typesFromAssemblyContainingMessages)
 Registers all IEventHandler and ICommandHandler<TAuthenticationToken,TCommand> instances found in the Assembly for each Type in typesFromAssemblyContainingMessages . More...
 
virtual void Register (bool trueForEventsFalseForCommands, Func< Type, IEnumerable< Type >> resolveMessageHandlerInterface, bool skipCommandHandlers, params Type[] typesFromAssemblyContainingMessages)
 Registers all IHandler instances found in the Assembly for each Type in typesFromAssemblyContainingMessages . More...
 
virtual void Register (bool trueForEventsFalseForCommands, Func< Type, IEnumerable< Type >> resolveMessageHandlerInterface, bool skipCommandHandlers, params HandlerTypeInformation[] executorTypes)
 Registers all IHandler instances in the provided executorTypes . More...
 
virtual IEnumerable< Type > ResolveEventHandlerInterface (Type type)
 Finds all Type that implement IEventHandler<TAuthenticationToken,TEvent> that are implemented by type . More...
 
virtual IEnumerable< Type > ResolveCommandHandlerInterface (Type type)
 Finds all Type that implement ICommandHandler<TAuthenticationToken,TCommand> that are implemented by type . More...
 

Protected Member Functions

virtual void InvokeHandler (Type @interface, bool trueForEventsFalseForCommands, Func< Type, IEnumerable< Type >> resolveMessageHandlerInterface, Type executorType)
 Extract the IHandlerRegistrar.RegisterHandler<TMessage>(System.Action<TMessage>,System.Type,bool) method of GetEventHandlerRegistrar or GetCommandHandlerRegistrar. Create an Action around the provided executorType Then register the created Action using the extracted IHandlerRegistrar.RegisterHandler<TMessage>(System.Action<TMessage>,System.Type,bool) method More...
 
virtual void InvokeHandlerDelegate (MethodInfo registerExecutorMethod, bool trueForEventsFalseForCommands, HandlerDelegate handlerDelegate)
 Invokes handlerDelegate , fetching the corresponding "HoldMessageLock" configuration setting More...
 
virtual HandlerDelegate BuildDelegateAction (Type executorType, Func< Type, IEnumerable< Type >> resolveMessageHandlerInterface)
 Builds a HandlerDelegate that will resolve the provided executorType and invoke the Handle method, when executed. More...
 
virtual MethodInfo BuildExecutorMethod (MethodInfo originalRegisterExecutorMethod, Type executorType, Type commandType)
 Builds a method replacing the generic type with commandType . More...
 

Properties

IDependencyResolver DependencyResolver [get]
 Gets or set the IDependencyResolver. More...
 
static Func< Type, Type, IHandlerRegistrarGetEventHandlerRegistrar [get, set]
 A Func<Type, Type, THandlerRegistrar> to use in-place of IEventHandlerRegistrar More...
 
static Func< Type, Type, IHandlerRegistrarGetCommandHandlerRegistrar [get, set]
 A Func<Type, Type, THandlerRegistrar> to use in-place of ICommandHandlerRegistrar More...
 

Detailed Description

Triggers the IEventHandlerRegistrar and ICommandHandlerRegistrar if they are registered in the IDependencyResolver.