Ejemplo n.º 1
0
        public ChannelDetailsPageViewModel(Channel channel)
        {
            _channel = channel;
            _eventsRetriever = new EventRetriever();

            EventsForDate = new ObservableCollection<EventForDate>();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets all commits for the specified <paramref name="streamId"/>.
        /// </summary>
        /// <param name="eventStore">The event store.</param>
        /// <param name="streamId">The unique stream identifier.</param>
        public static IEnumerable <Commit> GetStream(this IRetrieveEvents eventStore, Guid streamId)
        {
            Verify.NotNull(eventStore, nameof(eventStore));

            return(eventStore.GetStream(streamId, 1));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all commits from the event store.
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <Commit> GetAll(this IRetrieveEvents eventStore)
        {
            Verify.NotNull(eventStore, nameof(eventStore));

            return(new PagedResult <Commit>(Settings.EventStore.PageSize, (lastResult, page) => eventStore.GetRange(lastResult == null ? 0L : lastResult.Id.GetValueOrDefault(), page.Take)));
        }