Ejemplo n.º 1
0
        /// <summary>
        /// Get all undispatched commits.
        /// </summary>
        public IEnumerable <Commit> GetUndispatched()
        {
            var result = eventStore.GetUndispatched();

            statistics.IncrementQueryCount();

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new saga instance identified by the specified <paramref name="type"/> and <paramref name="id"/>.
        /// </summary>
        /// <param name="type">The type of saga to be retrieved.</param>
        /// <param name="id">The correlation id of the saga to be retrieved.</param>
        public Saga CreateSaga(Type type, Guid id)
        {
            var result = sagaStore.CreateSaga(type, id);

            statistics.IncrementQueryCount();

            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the most recent snapshot for the specified <paramref name="streamId"/> and <paramref name="maximumVersion"/>.
        /// </summary>
        /// <param name="type">The snapshot type.</param>
        /// <param name="streamId">The unique stream identifier.</param>
        /// <param name="maximumVersion">The maximum snapshot version.</param>
        public Snapshot GetSnapshot(Type type, Guid streamId, Int32 maximumVersion)
        {
            var result = snapshotStore.GetSnapshot(type, streamId, maximumVersion);

            statistics.IncrementQueryCount();

            return(result);
        }