Skip to content

Commit

Permalink
fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bustedbunny committed Feb 20, 2023
1 parent 2e4dd69 commit 41ae83c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions Runtime/Messaging/Messages/UniTaskCollectionRequestMessage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down Expand Up @@ -50,20 +49,6 @@ private struct TaskOrFunc
/// // Process each document here...
/// }
/// </code>
/// If we also want to control the cancellation of the token passed to each subscriber to the message,
/// we can do so by passing a token we control to the returned message before starting the enumeration
/// (<see cref="TaskAsyncEnumerableExtensions.WithCancellation{T}(IAsyncEnumerable{T},CancellationToken)"/>).
/// The previous snippet with this additional change looks as follows:
/// <code>
/// await foreach (var document in Messenger.Default.Send&lt;OpenDocumentsRequestMessage&gt;().WithCancellation(cts.Token))
/// {
/// // Process each document here...
/// }
/// </code>
/// When no more new items are needed (or for any other reason depending on the situation), the token
/// passed to the enumerator can be canceled (by calling <see cref="CancellationTokenSource.Cancel()"/>),
/// and that will also notify the remaining tasks in the request message. The token exposed by the message
/// itself will automatically be linked and canceled with the one passed to the enumerator.
/// </summary>
public CancellationToken CancellationToken => _cancellationTokenSource.Token;

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Messaging/Messages/UniTaskRequestMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static void ThrowInvalidOperationExceptionForNoResponseReceived()
}

/// <summary>
/// Throws an <see cref="InvalidOperationException"/> when <see cref="Reply(T)"/> or <see cref="Reply(Task{T})"/> are called twice.
/// Throws an <see cref="InvalidOperationException"/> when <see cref="Reply(T)"/> or <see cref="Reply(UniTask{T})"/> are called twice.
/// </summary>
[DoesNotReturn]
private static void ThrowInvalidOperationExceptionForDuplicateReply()
Expand Down

0 comments on commit 41ae83c

Please sign in to comment.