예제 #1
0
 public async Task PublishEventsAsync(AggregateChangeReport aggregateChangeReport, CancellationToken cancellationToken = default)
 {
     foreach (Envelope domainEvent in aggregateChangeReport.DomainEvents)
     {
         await _eventBus.PublishAsync(domainEvent.Message.GetType(), (IEvent)domainEvent.Message, domainEvent.Headers, cancellationToken);
     }
 }
예제 #2
0
 public virtual void PublishEvents(AggregateChangeReport aggregateChangeReport)
 {
     foreach (Envelope domainEvent in aggregateChangeReport.DomainEvents)
     {
         _eventBus.Publish(domainEvent.Message.GetType(), (IEvent)domainEvent.Message, domainEvent.Headers);
     }
 }
 public Task PublishEventsAsync(AggregateChangeReport aggregateChangeReport, CancellationToken cancellationToken = default)
 {
     return(Task.FromResult(0));
 }
 public void PublishEvents(AggregateChangeReport aggregateChangeReport)
 {
 }