Skip to content

Commit

Permalink
change XML docs on ServiceBusReceiver.ReceiveDeferred methods (#23283)
Browse files Browse the repository at this point in the history
to correctly reflect MessageNotFound exception result
  • Loading branch information
dlumpp authored Aug 12, 2021
1 parent 40aa41b commit 08a8b3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ internal async Task SetStateInternal(
/// </summary>
/// <param name="sequenceNumbers">A <see cref="IList{SequenceNumber}"/> containing the sequence numbers to receive.</param>
/// <param name="cancellationToken"></param>
/// <returns>Messages identified by sequence number are returned. Returns null if no messages are found.
/// <returns>Messages identified by sequence number are returned.
/// Throws if the messages have not been deferred.</returns>
/// <seealso cref="DeferAsync"/>
public override async Task<IReadOnlyList<ServiceBusReceivedMessage>> ReceiveDeferredMessagesAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public abstract Task DeadLetterAsync(
/// </summary>
/// <param name="sequenceNumbers">A <see cref="IList{SequenceNumber}"/> containing the sequence numbers to receive.</param>
/// <param name="cancellationToken"></param>
/// <returns>Messages identified by sequence number are returned. Returns null if no messages are found.
/// <returns>Messages identified by sequence number are returned.
/// Throws if the messages have not been deferred.</returns>
/// <seealso cref="DeferAsync"/>
public abstract Task<IReadOnlyList<ServiceBusReceivedMessage>> ReceiveDeferredMessagesAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,14 @@ private static void ThrowIfLockTokenIsEmpty(Guid lockToken)
/// the <see cref="ServiceBusReceivedMessage.SequenceNumber"/>.</param>
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param>
///
/// <returns>The deferred message identified by the specified sequence number. Returns null if no message is found.
/// <returns>The deferred message identified by the specified sequence number.
/// Throws if the message has not been deferred.</returns>
/// <seealso cref="DeferMessageAsync(ServiceBusReceivedMessage, IDictionary{string, object}, CancellationToken)"/>
/// <seealso cref="DeferMessageAsync(Guid, IDictionary{string, object}, CancellationToken)"/>
/// <exception cref="ServiceBusException">
/// The specified sequence number does not correspond to a message that has been deferred.
/// The <see cref="ServiceBusException.Reason" /> will be set to <see cref="ServiceBusFailureReason.MessageNotFound"/> in this case.
/// </exception>
public virtual async Task<ServiceBusReceivedMessage> ReceiveDeferredMessageAsync(
long sequenceNumber,
CancellationToken cancellationToken = default) =>
Expand All @@ -966,7 +970,7 @@ public virtual async Task<ServiceBusReceivedMessage> ReceiveDeferredMessageAsync
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param>
/// <param name="sequenceNumbers">An <see cref="IEnumerable{T}"/> containing the sequence numbers to receive.</param>
///
/// <returns>Messages identified by sequence number are returned. Returns null if no messages are found.
/// <returns>Messages identified by sequence number are returned.
/// Throws if the messages have not been deferred.</returns>
/// <seealso cref="DeferMessageAsync(ServiceBusReceivedMessage, IDictionary{string, object}, CancellationToken)"/>
/// <seealso cref="DeferMessageAsync(Guid, IDictionary{string, object}, CancellationToken)"/>
Expand Down

0 comments on commit 08a8b3b

Please sign in to comment.