/// <inheritdoc />
 /// <summary>
 /// Inserts or updates a subscription record in the SQL database
 /// </summary>
 /// <param name="topic">The topic to which the <paramref name="subscriber" /> is subscribing</param>
 /// <param name="subscriber">The base URI of the subscribing Platibus instance</param>
 /// <param name="expires">The date and time at which the subscription will expire</param>
 /// <returns>Returns a task that will complete when the subscription record has been inserted
 /// or updated and whose result will be the an immutable representation of the inserted
 /// subscription record</returns>
 protected override Task <SQLSubscription> InsertOrUpdateSubscription(TopicName topic, Uri subscriber,
                                                                      DateTime expires)
 {
     CheckDisposed();
     return(_commandExecutor.ExecuteRead(
                () => base.InsertOrUpdateSubscription(topic, subscriber, expires)));
 }
Esempio n. 2
0
 /// <inheritdoc />
 protected override Task <IEnumerable <QueuedMessage> > GetPendingMessages(CancellationToken cancellationToken = default(CancellationToken))
 {
     CheckDisposed();
     return(_commandExecutor.ExecuteRead(
                () => base.GetPendingMessages(cancellationToken),
                cancellationToken));
 }
 /// <inheritdoc />
 public override Task <MessageJournalReadResult> Read(MessageJournalPosition start, int count, MessageJournalFilter filter = null,
                                                      CancellationToken cancellationToken = new CancellationToken())
 {
     CheckDisposed();
     return(_commandExecutor.ExecuteRead(
                () => base.Read(start, count, filter, cancellationToken),
                cancellationToken));
 }