public async Task Register(IMessagesRouter router) { await router.RegisterHandler <DomainEvent, DefaultMessageLoggerHandler>(); await router.RegisterHandler <ICommand, DefaultMessageLoggerHandler>(); await router.RegisterHandler <IFault, DefaultMessageLoggerHandler>(); }
public async Task Register(IMessagesRouter router) { await router.RegisterAggregate(SampleAggregatesCommandHandler.Descriptor); await router.RegisterProjectionGroup(new SampleProjectionGroup(_locator)); await router.RegisterHandler <SampleAggregateChangedEvent, SampleProjectionBuilder>(m => m.SourceId); }
//TODO: add version without correlation property public static Task RegisterHandler <TMessage, THandler>(this IMessagesRouter router, Expression <Func <TMessage, Guid> > correlationPropertyExpression = null) where THandler : IHandler <TMessage> { return(router.RegisterHandler <TMessage, THandler>(MemberNameExtractor.GetName(correlationPropertyExpression))); }
public async Task Register(IMessagesRouter router) { await router.RegisterAggregate(BalanceAggregatesCommandHandler.Descriptor); await router.RegisterHandler <BalanceChangedEvent_V0, SampleProjectionBuilder>(m => m.SourceId); }