Пример #1
0
        protected virtual Task Handle(IDomainEvent domainEvent)
        {
            var sagaId = SagaLocator.LocateSaga(domainEvent);
            var saga   = FindOrSpawn(sagaId);

            saga.Tell(domainEvent, Sender);
            return(Task.CompletedTask);
        }
Пример #2
0
        protected virtual bool Handle(IDomainEvent domainEvent)
        {
            var sagaId = SagaLocator.LocateSaga(domainEvent);
            var saga   = FindOrSpawn(sagaId);

            saga.Tell(domainEvent, Sender);
            return(true);
        }
Пример #3
0
        public Task Handle(IDomainEvent <TestAggregate, TestAggregateId, TestReceivedEvent> domainEvent)
        {
            var sagaId = SagaLocator.LocateSaga(domainEvent);
            var saga   = FindOrSpawn(sagaId);

            saga.Tell(domainEvent, Sender);
            return(Task.CompletedTask);
        }