Grpc.Core.AsyncClientStreamingCall-2.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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>Class AsyncClientStreamingCall&lt;TRequest, TResponse&gt;
  8. | gRPC for .NET </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class AsyncClientStreamingCall&lt;TRequest, TResponse&gt;
  11. | gRPC for .NET ">
  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.AsyncClientStreamingCall`2">
  73. <h1 id="Grpc_Core_AsyncClientStreamingCall_2" data-uid="Grpc.Core.AsyncClientStreamingCall`2" class="text-break">Class AsyncClientStreamingCall&lt;TRequest, TResponse&gt;
  74. </h1>
  75. <div class="markdown level0 summary"><p>Return type for client streaming calls.</p>
  76. </div>
  77. <div class="markdown level0 conceptual"></div>
  78. <div class="inheritance">
  79. <h5>Inheritance</h5>
  80. <div class="level0"><span class="xref">IDisposable</span></div>
  81. <div class="level1"><span class="xref">AsyncClientStreamingCall&lt;TRequest, TResponse&gt;</span></div>
  82. </div>
  83. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  84. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  85. <h5 id="Grpc_Core_AsyncClientStreamingCall_2_syntax">Syntax</h5>
  86. <div class="codewrapper">
  87. <pre><code class="lang-csharp hljs">public sealed class AsyncClientStreamingCall&lt;TRequest, TResponse&gt; : IDisposable</code></pre>
  88. </div>
  89. <h5 class="typeParameters">Type Parameters</h5>
  90. <table class="table table-bordered table-striped table-condensed">
  91. <thead>
  92. <tr>
  93. <th>Name</th>
  94. <th>Description</th>
  95. </tr>
  96. </thead>
  97. <tbody>
  98. <tr>
  99. <td><span class="parametername">TRequest</span></td>
  100. <td><p>Request message type for this call.</p>
  101. </td>
  102. </tr>
  103. <tr>
  104. <td><span class="parametername">TResponse</span></td>
  105. <td><p>Response message type for this call.</p>
  106. </td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. <h3 id="constructors">Constructors
  111. </h3>
  112. <a id="Grpc_Core_AsyncClientStreamingCall_2__ctor_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.#ctor*"></a>
  113. <h4 id="Grpc_Core_AsyncClientStreamingCall_2__ctor_Grpc_Core_IClientStreamWriter__0__Task__1__Task_Grpc_Core_Metadata__Func_Grpc_Core_Status__Func_Grpc_Core_Metadata__Action_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.#ctor(Grpc.Core.IClientStreamWriter{`0},Task{`1},Task{Grpc.Core.Metadata},Func{Grpc.Core.Status},Func{Grpc.Core.Metadata},Action)">AsyncClientStreamingCall(IClientStreamWriter&lt;TRequest&gt;, Task&lt;TResponse&gt;, Task&lt;Metadata&gt;, Func&lt;Status&gt;, Func&lt;Metadata&gt;, Action)</h4>
  114. <div class="markdown level1 summary"><p>Creates a new AsyncClientStreamingCall object with the specified properties.</p>
  115. </div>
  116. <div class="markdown level1 conceptual"></div>
  117. <h5 class="decalaration">Declaration</h5>
  118. <div class="codewrapper">
  119. <pre><code class="lang-csharp hljs">public AsyncClientStreamingCall(IClientStreamWriter&lt;TRequest&gt; requestStream, Task&lt;TResponse&gt; responseAsync, Task&lt;Metadata&gt; responseHeadersAsync, Func&lt;Status&gt; getStatusFunc, Func&lt;Metadata&gt; getTrailersFunc, Action disposeAction)</code></pre>
  120. </div>
  121. <h5 class="parameters">Parameters</h5>
  122. <table class="table table-bordered table-striped table-condensed">
  123. <thead>
  124. <tr>
  125. <th>Type</th>
  126. <th>Name</th>
  127. <th>Description</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. <tr>
  132. <td><a class="xref" href="Grpc.Core.IClientStreamWriter-1.html">IClientStreamWriter</a>&lt;TRequest&gt;</td>
  133. <td><span class="parametername">requestStream</span></td>
  134. <td><p>Stream of request values.</p>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td><span class="xref">Task</span>&lt;TResponse&gt;</td>
  139. <td><span class="parametername">responseAsync</span></td>
  140. <td><p>The response of the asynchronous call.</p>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td><span class="xref">Task</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  145. <td><span class="parametername">responseHeadersAsync</span></td>
  146. <td><p>Response headers of the asynchronous call.</p>
  147. </td>
  148. </tr>
  149. <tr>
  150. <td><span class="xref">Func</span>&lt;<a class="xref" href="Grpc.Core.Status.html">Status</a>&gt;</td>
  151. <td><span class="parametername">getStatusFunc</span></td>
  152. <td><p>Delegate returning the status of the call.</p>
  153. </td>
  154. </tr>
  155. <tr>
  156. <td><span class="xref">Func</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  157. <td><span class="parametername">getTrailersFunc</span></td>
  158. <td><p>Delegate returning the trailing metadata of the call.</p>
  159. </td>
  160. </tr>
  161. <tr>
  162. <td><span class="xref">Action</span></td>
  163. <td><span class="parametername">disposeAction</span></td>
  164. <td><p>Delegate to invoke when Dispose is called on the call object.</p>
  165. </td>
  166. </tr>
  167. </tbody>
  168. </table>
  169. <h3 id="properties">Properties
  170. </h3>
  171. <a id="Grpc_Core_AsyncClientStreamingCall_2_RequestStream_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.RequestStream*"></a>
  172. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_RequestStream" data-uid="Grpc.Core.AsyncClientStreamingCall`2.RequestStream">RequestStream</h4>
  173. <div class="markdown level1 summary"><p>Async stream to send streaming requests.</p>
  174. </div>
  175. <div class="markdown level1 conceptual"></div>
  176. <h5 class="decalaration">Declaration</h5>
  177. <div class="codewrapper">
  178. <pre><code class="lang-csharp hljs">public IClientStreamWriter&lt;TRequest&gt; RequestStream { get; }</code></pre>
  179. </div>
  180. <h5 class="propertyValue">Property Value</h5>
  181. <table class="table table-bordered table-striped table-condensed">
  182. <thead>
  183. <tr>
  184. <th>Type</th>
  185. <th>Description</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. <tr>
  190. <td><a class="xref" href="Grpc.Core.IClientStreamWriter-1.html">IClientStreamWriter</a>&lt;TRequest&gt;</td>
  191. <td></td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. <a id="Grpc_Core_AsyncClientStreamingCall_2_ResponseAsync_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.ResponseAsync*"></a>
  196. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_ResponseAsync" data-uid="Grpc.Core.AsyncClientStreamingCall`2.ResponseAsync">ResponseAsync</h4>
  197. <div class="markdown level1 summary"><p>Asynchronous call result.</p>
  198. </div>
  199. <div class="markdown level1 conceptual"></div>
  200. <h5 class="decalaration">Declaration</h5>
  201. <div class="codewrapper">
  202. <pre><code class="lang-csharp hljs">public Task&lt;TResponse&gt; ResponseAsync { get; }</code></pre>
  203. </div>
  204. <h5 class="propertyValue">Property Value</h5>
  205. <table class="table table-bordered table-striped table-condensed">
  206. <thead>
  207. <tr>
  208. <th>Type</th>
  209. <th>Description</th>
  210. </tr>
  211. </thead>
  212. <tbody>
  213. <tr>
  214. <td><span class="xref">Task</span>&lt;TResponse&gt;</td>
  215. <td></td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. <a id="Grpc_Core_AsyncClientStreamingCall_2_ResponseHeadersAsync_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.ResponseHeadersAsync*"></a>
  220. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_ResponseHeadersAsync" data-uid="Grpc.Core.AsyncClientStreamingCall`2.ResponseHeadersAsync">ResponseHeadersAsync</h4>
  221. <div class="markdown level1 summary"><p>Asynchronous access to response headers.</p>
  222. </div>
  223. <div class="markdown level1 conceptual"></div>
  224. <h5 class="decalaration">Declaration</h5>
  225. <div class="codewrapper">
  226. <pre><code class="lang-csharp hljs">public Task&lt;Metadata&gt; ResponseHeadersAsync { get; }</code></pre>
  227. </div>
  228. <h5 class="propertyValue">Property Value</h5>
  229. <table class="table table-bordered table-striped table-condensed">
  230. <thead>
  231. <tr>
  232. <th>Type</th>
  233. <th>Description</th>
  234. </tr>
  235. </thead>
  236. <tbody>
  237. <tr>
  238. <td><span class="xref">Task</span>&lt;<a class="xref" href="Grpc.Core.Metadata.html">Metadata</a>&gt;</td>
  239. <td></td>
  240. </tr>
  241. </tbody>
  242. </table>
  243. <h3 id="methods">Methods
  244. </h3>
  245. <a id="Grpc_Core_AsyncClientStreamingCall_2_Dispose_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.Dispose*"></a>
  246. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_Dispose" data-uid="Grpc.Core.AsyncClientStreamingCall`2.Dispose">Dispose()</h4>
  247. <div class="markdown level1 summary"><p>Provides means to cleanup after the call.
  248. If the call has already finished normally (request stream has been completed and call result has been received), doesn&apos;t do anything.
  249. Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call.
  250. As a result, all resources being used by the call should be released eventually.</p>
  251. </div>
  252. <div class="markdown level1 conceptual"></div>
  253. <h5 class="decalaration">Declaration</h5>
  254. <div class="codewrapper">
  255. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  256. </div>
  257. <h5 id="Grpc_Core_AsyncClientStreamingCall_2_Dispose_remarks">Remarks</h5>
  258. <div class="markdown level1 remarks"><p>Normally, there is no need for you to dispose the call unless you want to utilize the
  259. &quot;Cancel&quot; semantics of invoking <code>Dispose</code>.</p>
  260. </div>
  261. <a id="Grpc_Core_AsyncClientStreamingCall_2_GetAwaiter_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetAwaiter*"></a>
  262. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_GetAwaiter" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetAwaiter">GetAwaiter()</h4>
  263. <div class="markdown level1 summary"><p>Allows awaiting this object directly.</p>
  264. </div>
  265. <div class="markdown level1 conceptual"></div>
  266. <h5 class="decalaration">Declaration</h5>
  267. <div class="codewrapper">
  268. <pre><code class="lang-csharp hljs">public TaskAwaiter&lt;TResponse&gt; GetAwaiter()</code></pre>
  269. </div>
  270. <h5 class="returns">Returns</h5>
  271. <table class="table table-bordered table-striped table-condensed">
  272. <thead>
  273. <tr>
  274. <th>Type</th>
  275. <th>Description</th>
  276. </tr>
  277. </thead>
  278. <tbody>
  279. <tr>
  280. <td><span class="xref">TaskAwaiter</span>&lt;TResponse&gt;</td>
  281. <td></td>
  282. </tr>
  283. </tbody>
  284. </table>
  285. <a id="Grpc_Core_AsyncClientStreamingCall_2_GetStatus_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetStatus*"></a>
  286. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_GetStatus" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetStatus">GetStatus()</h4>
  287. <div class="markdown level1 summary"><p>Gets the call status if the call has already finished.
  288. Throws InvalidOperationException otherwise.</p>
  289. </div>
  290. <div class="markdown level1 conceptual"></div>
  291. <h5 class="decalaration">Declaration</h5>
  292. <div class="codewrapper">
  293. <pre><code class="lang-csharp hljs">public Status GetStatus()</code></pre>
  294. </div>
  295. <h5 class="returns">Returns</h5>
  296. <table class="table table-bordered table-striped table-condensed">
  297. <thead>
  298. <tr>
  299. <th>Type</th>
  300. <th>Description</th>
  301. </tr>
  302. </thead>
  303. <tbody>
  304. <tr>
  305. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  306. <td></td>
  307. </tr>
  308. </tbody>
  309. </table>
  310. <a id="Grpc_Core_AsyncClientStreamingCall_2_GetTrailers_" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetTrailers*"></a>
  311. <h4 id="Grpc_Core_AsyncClientStreamingCall_2_GetTrailers" data-uid="Grpc.Core.AsyncClientStreamingCall`2.GetTrailers">GetTrailers()</h4>
  312. <div class="markdown level1 summary"><p>Gets the call trailing metadata if the call has already finished.
  313. Throws InvalidOperationException otherwise.</p>
  314. </div>
  315. <div class="markdown level1 conceptual"></div>
  316. <h5 class="decalaration">Declaration</h5>
  317. <div class="codewrapper">
  318. <pre><code class="lang-csharp hljs">public Metadata GetTrailers()</code></pre>
  319. </div>
  320. <h5 class="returns">Returns</h5>
  321. <table class="table table-bordered table-striped table-condensed">
  322. <thead>
  323. <tr>
  324. <th>Type</th>
  325. <th>Description</th>
  326. </tr>
  327. </thead>
  328. <tbody>
  329. <tr>
  330. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  331. <td></td>
  332. </tr>
  333. </tbody>
  334. </table>
  335. </article>
  336. </div>
  337. <div class="hidden-sm col-md-2" role="complementary">
  338. <div class="sideaffix">
  339. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  340. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  341. </nav>
  342. </div>
  343. </div>
  344. </div>
  345. </div>
  346. <footer>
  347. <div class="grad-bottom"></div>
  348. <div class="footer">
  349. <div class="container">
  350. <span class="pull-right">
  351. <a href="#top">Back to top</a>
  352. </span>
  353. <span>Generated by <strong>DocFX</strong></span>
  354. </div>
  355. </div>
  356. </footer>
  357. </div>
  358. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  359. <script type="text/javascript" src="../styles/docfx.js"></script>
  360. <script type="text/javascript" src="../styles/main.js"></script>
  361. </body>
  362. </html>