Exemplo n.º 1
0
        /// <summary>
        /// Mark single domain event as processed.
        /// Redirects call to the collection API.
        /// </summary>
        /// <typeparam name="TEvent">domain event type</typeparam>
        /// <param name="store">domain event store</param>
        /// <param name="domainEvent">mark domain event as processed</param>
        public static void Mark <TEvent>(this IDomainEventStore <TEvent> store, TEvent domainEvent)
            where TEvent : IDomainEvent
        {
            Contract.Requires(store != null);
            Contract.Requires(domainEvent != null);
            Contract.Requires(domainEvent.ProcessedAt == null);

            store.Mark(new[] { domainEvent.URI });
        }