public Task <IStreamSubscription> SubscribeToAllAsync(Position start, Func <IStreamSubscription, ResolvedEvent, CancellationToken, Task> eventAppeared, bool resolveLinkTos = false, Action <IStreamSubscription, SubscriptionDroppedReason, Exception> subscriptionDropped = null, FilterOptions filterOptions = null, Func <IStreamSubscription, Position, CancellationToken, Task> checkpointReached = null, Action <EventStoreClientOperationOptions> configureOperationOptions = null, UserCredentials userCredentials = null, CancellationToken cancellationToken = new CancellationToken()) { return(_client.SubscribeToAllAsync(start, eventAppeared, resolveLinkTos, subscriptionDropped, filterOptions, checkpointReached, configureOperationOptions, DefaultCredentials ?? userCredentials, cancellationToken)); }
public async Task <IStreamSubscription> SubscribeToAllAsync(Position start, Func <IStreamSubscription, ResolvedEvent, CancellationToken, Task> eventAppeared, bool resolveLinkTos = false, Action <IStreamSubscription, SubscriptionDroppedReason, Exception> subscriptionDropped = null, FilterOptions filterOptions = null, Func <IStreamSubscription, Position, CancellationToken, Task> checkpointReached = null, Action <EventStoreClientOperationOptions> configureOperationOptions = null, UserCredentials userCredentials = null, CancellationToken cancellationToken = new CancellationToken()) { HttpStreamSubscription subscription = new HttpStreamSubscription(); return(subscription.WriteThough(await Client.SubscribeToAllAsync(start, async(s, r, c) => eventAppeared?.Invoke(subscription.WriteThough(s), r, c), resolveLinkTos, (s, r, e) => subscriptionDropped?.Invoke(subscription.WriteThough(s), r, e), filterOptions, async(s, p, c) => checkpointReached?.Invoke(subscription.WriteThough(s), p, c), configureOperationOptions, userCredentials, cancellationToken))); }
public IAsyncEnumerable <ResolvedEvent> ReadAllAsync(Direction direction, Position position, ulong maxCount, Action <EventStoreClientOperationOptions> configureOperationOptions = null, bool resolveLinkTos = false, FilterOptions filterOptions = null, UserCredentials userCredentials = null, CancellationToken cancellationToken = new CancellationToken()) { return(_client.ReadAllAsync(direction, position, maxCount, configureOperationOptions, resolveLinkTos, filterOptions, DefaultCredentials ?? userCredentials, cancellationToken)); }