public void Dispatch(IEventStore eventStore, IEnumerable<DomainEvent> events)
        {
            var domainEvents = events.ToList();

            if (!domainEvents.Any()) return;

            var notification = new DispatchNotification
            {
                DomainEvents = _serializer.Serialize(domainEvents)
            };

            _topicClient.Send(new BrokeredMessage(notification));
        }
Ejemplo n.º 2
0
        public void Dispatch(IEnumerable <DomainEvent> events)
        {
            var domainEvents = events.ToList();

            if (!domainEvents.Any())
            {
                return;
            }

            var notification = new DispatchNotification
            {
                DomainEvents = _serializer.Serialize(domainEvents)
            };

            _topicClient.Send(new BrokeredMessage(notification));
        }