From 2eb09ee543e5ce9e34e895b5d2a6fbff79d6ddc6 Mon Sep 17 00:00:00 2001
From: Jan Tattermusch <jtattermusch@google.com>
Date: Tue, 14 Jun 2016 17:50:20 -0700
Subject: [PATCH] improve docs for IAsyncStreamReader

---
 src/csharp/Grpc.Core/IAsyncStreamReader.cs | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/csharp/Grpc.Core/IAsyncStreamReader.cs b/src/csharp/Grpc.Core/IAsyncStreamReader.cs
index 49e1ea7832..aa3b802a50 100644
--- a/src/csharp/Grpc.Core/IAsyncStreamReader.cs
+++ b/src/csharp/Grpc.Core/IAsyncStreamReader.cs
@@ -41,10 +41,24 @@ namespace Grpc.Core
 {
     /// <summary>
     /// A stream of messages to be read.
+    /// Messages can be awaited <c>await reader.MoveNext()</c>, that returns <c>true</c>
+    /// if there is a message available and <c>false</c> if there are no more messages
+    /// (i.e. the stream has been closed).
+    /// <para>
+    /// On the client side, the last invocation of <c>MoveNext()</c> either returns <c>false</c>
+    /// if the call has finished successfully or throws <c>RpcException</c> if call finished
+    /// with an error. Once the call finishes, subsequent invocations of <c>MoveNext()</c> will
+    /// continue yielding the same result (returning <c>false</c> or throwing an exception).
+    /// </para>
+    /// <para>
+    /// On the server side, <c>MoveNext()</c> does not throw exceptions.
+    /// In case of a failure, the request stream will appear to be finished
+    /// (<c>MoveNext</c> will return <c>false</c>) and the <c>CancellationToken</c>
+    /// associated with the call will be cancelled to signal the failure.
+    /// </para>
     /// </summary>
     /// <typeparam name="T">The message type.</typeparam>
     public interface IAsyncStreamReader<T> : IAsyncEnumerator<T>
     {
-        // TODO(jtattermusch): consider just using IAsyncEnumerator instead of this interface.
     }
 }
-- 
GitLab