Class AkkaBusRegistrar<TAuthenticationToken>
Triggers the BusRegistrar instantiates instances of IEventHandler<TAuthenticationToken, TEvent> and ICommandHandler<TAuthenticationToken, TCommand> classes that inherit the akka.net Akka.Actor.ReceiveActor via the IDependencyResolver so their message registration kicks in.
Inherited Members
Namespace: Cqrs.Akka.Configuration
Assembly: Cqrs.Akka.dll
Syntax
public class AkkaBusRegistrar<TAuthenticationToken> : BusRegistrar
Type Parameters
Name | Description |
---|---|
TAuthenticationToken |
Constructors
AkkaBusRegistrar(IDependencyResolver, IHandlerResolver)
Instantiates a new instance of AkkaBusRegistrar<TAuthenticationToken>.
Declaration
public AkkaBusRegistrar(IDependencyResolver dependencyResolver, IHandlerResolver handlerResolver)
Parameters
Type | Name | Description |
---|---|---|
IDependencyResolver | dependencyResolver | |
IHandlerResolver | handlerResolver |
Properties
HandlerResolver
Gets or sets the IHandlerResolver.
Declaration
protected IHandlerResolver HandlerResolver { get; }
Property Value
Type | Description |
---|---|
IHandlerResolver |
Methods
BuildDelegateAction(Type, Func<Type, IEnumerable<Type>>)
Builds a HandlerDelegate that will resolve the provided executorType
and invoke the Handle method, when executed.
Declaration
protected override HandlerDelegate BuildDelegateAction(Type executorType, Func<Type, IEnumerable<Type>> resolveMessageHandlerInterface)
Parameters
Type | Name | Description |
---|---|---|
System.Type | executorType | The type of IHandler to resolve.> |
System.Func<System.Type, System.Collections.Generic.IEnumerable<System.Type>> | resolveMessageHandlerInterface | Not used. |
Returns
Type | Description |
---|---|
HandlerDelegate |
Overrides
InvokeHandlerDelegate(MethodInfo, Boolean, HandlerDelegate)
Invokes handlerDelegate
, fetching the corresponding "HoldMessageLock" configuration setting
Declaration
protected override void InvokeHandlerDelegate(MethodInfo registerExecutorMethod, bool trueForEventsFalseForCommands, HandlerDelegate handlerDelegate)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | registerExecutorMethod | The System.Reflection.MethodInfo to use to invoke |
System.Boolean | trueForEventsFalseForCommands | Indicates if this is registers IEventHandler or ICommandHandler<TAuthenticationToken, TCommand>. |
HandlerDelegate | handlerDelegate | The actual HandlerDelegate that gets executed. |