Interface IReactorMethodArgumentsResolver
- Namespace
- Cratis.Chronicle.Reactors
- Assembly
- Cratis.Chronicle.dll
Defines a system that resolves the arguments to pass to a reactor handler method.
public interface IReactorMethodArgumentsResolver
- Extension Methods
Remarks
The first parameter of a handler method is always the event it reacts to. Any further parameters are resolved as dependencies: an EventContext parameter receives the event context, a ReactorDelivery parameter receives the identity of this delivery, a read model parameter is materialized strongly consistent from its reducer or projection, and any other parameter is resolved from the IServiceProvider.
Methods
Resolve(MethodInfo, object, object, EventContext, IEventStore?, IServiceProvider?)
Resolve the arguments for invoking a reactor handler method.
Task<object?[]> Resolve(MethodInfo method, object reactor, object @event, EventContext eventContext, IEventStore? eventStore, IServiceProvider? serviceProvider)
Parameters
methodMethodInfoThe MethodInfo of the handler method to resolve arguments for.
reactorobjectThe reactor instance the method belongs to.
eventobjectThe deserialized event that triggered the reactor.
eventContextEventContextThe EventContext for the triggering event.
eventStoreIEventStoreThe IEventStore used to detect and materialize read model parameters.
serviceProviderIServiceProviderThe IServiceProvider used to resolve any other dependencies.