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); } }
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) { }