/// <summary> /// Asynchronously opens a ReliableConnection. /// </summary> /// <param name="cancellationToken">A token that can be used to cancel the operation.</param> /// <returns>A task representing the completion of the open operation.</returns> public override Task OpenAsync(CancellationToken cancellationToken) { return(RetryStrategy.ExecuteWithRetryAsync(null, () => InnerConnection.OpenAsync().ContinueWith(t => { t.Wait(); return true; }))); }
/// <summary> /// Asynchronously opens a ReliableConnection. /// </summary> /// <param name="cancellationToken">A token that can be used to cancel the operation.</param> /// <returns>A task representing the completion of the open operation.</returns> public override Task OpenAsync(CancellationToken cancellationToken) { return(RetryStrategy.ExecuteWithRetryAsync(null, async() => { await InnerConnection.OpenAsync(cancellationToken).ConfigureAwait(false); return true; })); }