public ChannelDetailsPageViewModel(Channel channel) { _channel = channel; _eventsRetriever = new EventRetriever(); EventsForDate = new ObservableCollection<EventForDate>(); }
/// <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)); }
/// <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))); }