コード例 #1
0
        public async Task Register(IMessagesRouter router)
        {
            await router.RegisterHandler <DomainEvent, DefaultMessageLoggerHandler>();

            await router.RegisterHandler <ICommand, DefaultMessageLoggerHandler>();

            await router.RegisterHandler <IFault, DefaultMessageLoggerHandler>();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 //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)));
 }
コード例 #4
0
        public async Task Register(IMessagesRouter router)
        {
            await router.RegisterAggregate(BalanceAggregatesCommandHandler.Descriptor);

            await router.RegisterHandler <BalanceChangedEvent_V0, SampleProjectionBuilder>(m => m.SourceId);
        }