Grpc.Core.IAsyncStreamReader-1.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Interface IAsyncStreamReader&lt;T&gt;
  8. | gRPC C# </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Interface IAsyncStreamReader&lt;T&gt;
  11. | gRPC C# ">
  12. <meta name="generator" content="docfx 2.36.0.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <meta property="docfx:navrel" content="../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../index.html">
  34. <img id="logo" class="svg" src="../logo.svg" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Grpc.Core.IAsyncStreamReader`1">
  73. <h1 id="Grpc_Core_IAsyncStreamReader_1" data-uid="Grpc.Core.IAsyncStreamReader`1" class="text-break">Interface IAsyncStreamReader&lt;T&gt;
  74. </h1>
  75. <div class="markdown level0 summary"><p>A stream of messages to be read.
  76. Messages can be awaited <code>await reader.MoveNext()</code>, that returns <code>true</code>
  77. if there is a message available and <code>false</code> if there are no more messages
  78. (i.e. the stream has been closed).
  79. <p>
  80. On the client side, the last invocation of <code>MoveNext()</code> either returns <code>false</code>
  81. if the call has finished successfully or throws <code>RpcException</code> if call finished
  82. with an error. Once the call finishes, subsequent invocations of <code>MoveNext()</code> will
  83. continue yielding the same result (returning <code>false</code> or throwing an exception).
  84. </p>
  85. <p>
  86. On the server side, <code>MoveNext()</code> does not throw exceptions.
  87. In case of a failure, the request stream will appear to be finished
  88. (<code>MoveNext</code> will return <code>false</code>) and the <code>CancellationToken</code>
  89. associated with the call will be cancelled to signal the failure.
  90. </p>
  91. <p>
  92. <code>MoveNext()</code> operations can be cancelled via a cancellation token. Cancelling
  93. an individual read operation has the same effect as cancelling the entire call
  94. (which will also result in the read operation returning prematurely), but the per-read cancellation
  95. tokens passed to MoveNext() only result in cancelling the call if the read operation haven&apos;t finished
  96. yet.
  97. </p></p>
  98. </div>
  99. <div class="markdown level0 conceptual"></div>
  100. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  101. <h6><strong>Assembly</strong>: Grpc.Core.dll</h6>
  102. <h5 id="Grpc_Core_IAsyncStreamReader_1_syntax">Syntax</h5>
  103. <div class="codewrapper">
  104. <pre><code class="lang-csharp hljs">public interface IAsyncStreamReader&lt;T&gt; : IAsyncEnumerator&lt;T&gt;</code></pre>
  105. </div>
  106. <h5 class="typeParameters">Type Parameters</h5>
  107. <table class="table table-bordered table-striped table-condensed">
  108. <thead>
  109. <tr>
  110. <th>Name</th>
  111. <th>Description</th>
  112. </tr>
  113. </thead>
  114. <tbody>
  115. <tr>
  116. <td><span class="parametername">T</span></td>
  117. <td><p>The message type.</p>
  118. </td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </article>
  123. </div>
  124. <div class="hidden-sm col-md-2" role="complementary">
  125. <div class="sideaffix">
  126. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  127. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  128. </nav>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <footer>
  134. <div class="grad-bottom"></div>
  135. <div class="footer">
  136. <div class="container">
  137. <span class="pull-right">
  138. <a href="#top">Back to top</a>
  139. </span>
  140. <span>Generated by <strong>DocFX</strong></span>
  141. </div>
  142. </div>
  143. </footer>
  144. </div>
  145. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  146. <script type="text/javascript" src="../styles/docfx.js"></script>
  147. <script type="text/javascript" src="../styles/main.js"></script>
  148. </body>
  149. </html>