public async Task PublishAsync(DomainEventCollection eventCollection) { foreach (var e in eventCollection.GetEvents) { await Publish(e); } }
public DomainEventCollection PullDomainEvents() { var domainEvents = _events; _events = new DomainEventCollection(); return(domainEvents); }
protected override IStateTracker GetStateTracker(DomainEventCollection domainEvents) { var tracker = new EventProviderStateTracker(new EventProvider(_guidGenerator.Create(), domainEvents), EventProviderVersion.New, _guidGenerator); tracker.Apply(domainEvents); return(tracker); }
protected abstract IStateTracker GetStateTracker(DomainEventCollection domainEvents);