Ejemplo n.º 1
0
 private static Task ReadFeed(Container container, IEventFeedHandler eventHandler, int pageSizeHint, string?continuationToken, JsonSerializerOptions options, CancellationToken cancallationToken)
 {
     return(CosmosEventStore <TContainerFactory, TSnapshotReader> .ReadFeedJson(container, new JsonEventFeed.JsonEventFeedHandlerOverJsonSerializer(eventHandler, options), pageSizeHint, continuationToken, options, cancallationToken));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Reads an aggregate root.
 /// </summary>
 /// <typeparam name="TEventHandler">The type of the event reader for the aggregate root. This is an <see cref="IJsonEventFeedHandler"/>.</typeparam>
 /// <param name="eventHandler">The event reader capable of decoding and applying the event payloads for this aggregate root.</param>
 /// <param name="pageSizeHint">A hint as to the number of items you get in a page of results.</param>
 /// <param name="continuationToken">The (optional) continuation token to resume the feed from a particular point.</param>
 /// <param name="cancellationToken">The cancellation token to terminate reading the feed.</param>
 /// <returns>A <see cref="Task{TResult}"/> which completes when the feed terminates.</returns>
 public Task ReadFeedJson <TEventHandler>(TEventHandler eventHandler, int pageSizeHint, string?continuationToken, CancellationToken cancellationToken)
     where TEventHandler : IJsonEventFeedHandler
 {
     return(CosmosEventStore <TContainerFactory, TSnapshotReader> .ReadFeedJson(this.ContainerFactory.GetContainer(), eventHandler, pageSizeHint, continuationToken, this.Options, cancellationToken));
 }