Grpc.Core.Interceptors.Interceptor.html 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  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 Interceptor
  8. | gRPC for .NET </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Interceptor
  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.Interceptors.Interceptor">
  73. <h1 id="Grpc_Core_Interceptors_Interceptor" data-uid="Grpc.Core.Interceptors.Interceptor" class="text-break">Class Interceptor
  74. </h1>
  75. <div class="markdown level0 summary"><p>Serves as the base class for gRPC interceptors.</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">System.Object</span></div>
  81. <div class="level1"><span class="xref">Interceptor</span></div>
  82. </div>
  83. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.Interceptors.html">Grpc.Core.Interceptors</a></h6>
  84. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  85. <h5 id="Grpc_Core_Interceptors_Interceptor_syntax">Syntax</h5>
  86. <div class="codewrapper">
  87. <pre><code class="lang-csharp hljs">public abstract class Interceptor : object</code></pre>
  88. </div>
  89. <h3 id="methods">Methods
  90. </h3>
  91. <a id="Grpc_Core_Interceptors_Interceptor_AsyncClientStreamingCall_" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncClientStreamingCall*"></a>
  92. <h4 id="Grpc_Core_Interceptors_Interceptor_AsyncClientStreamingCall__2_Grpc_Core_Interceptors_ClientInterceptorContext___0___1__Grpc_Core_Interceptors_Interceptor_AsyncClientStreamingCallContinuation___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncClientStreamingCall``2(Grpc.Core.Interceptors.ClientInterceptorContext{``0,``1},Grpc.Core.Interceptors.Interceptor.AsyncClientStreamingCallContinuation{``0,``1})">AsyncClientStreamingCall&lt;TRequest, TResponse&gt;(ClientInterceptorContext&lt;TRequest, TResponse&gt;, Interceptor.AsyncClientStreamingCallContinuation&lt;TRequest, TResponse&gt;)</h4>
  93. <div class="markdown level1 summary"><p>Intercepts an asynchronous invocation of a client streaming call.</p>
  94. </div>
  95. <div class="markdown level1 conceptual"></div>
  96. <h5 class="decalaration">Declaration</h5>
  97. <div class="codewrapper">
  98. <pre><code class="lang-csharp hljs">public virtual AsyncClientStreamingCall&lt;TRequest, TResponse&gt; AsyncClientStreamingCall&lt;TRequest, TResponse&gt;(ClientInterceptorContext&lt;TRequest, TResponse&gt; context, Interceptor.AsyncClientStreamingCallContinuation&lt;TRequest, TResponse&gt; continuation)
  99. where TRequest : class where TResponse : class</code></pre>
  100. </div>
  101. <h5 class="parameters">Parameters</h5>
  102. <table class="table table-bordered table-striped table-condensed">
  103. <thead>
  104. <tr>
  105. <th>Type</th>
  106. <th>Name</th>
  107. <th>Description</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. <tr>
  112. <td><a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext</a>&lt;TRequest, TResponse&gt;</td>
  113. <td><span class="parametername">context</span></td>
  114. <td><p>The <a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext&lt;TRequest, TResponse&gt;</a>
  115. associated with the current invocation.</p>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td><a class="xref" href="Grpc.Core.Interceptors.Interceptor.AsyncClientStreamingCallContinuation-2.html">Interceptor.AsyncClientStreamingCallContinuation</a>&lt;TRequest, TResponse&gt;</td>
  120. <td><span class="parametername">continuation</span></td>
  121. <td><p>The callback that continues the invocation process.
  122. This can be invoked zero or more times by the interceptor.
  123. The interceptor can invoke the continuation passing the given
  124. context argument, or substitute as it sees fit.</p>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. <h5 class="returns">Returns</h5>
  130. <table class="table table-bordered table-striped table-condensed">
  131. <thead>
  132. <tr>
  133. <th>Type</th>
  134. <th>Description</th>
  135. </tr>
  136. </thead>
  137. <tbody>
  138. <tr>
  139. <td><a class="xref" href="Grpc.Core.AsyncClientStreamingCall-2.html">AsyncClientStreamingCall</a>&lt;TRequest, TResponse&gt;</td>
  140. <td><p>An instance of <a class="xref" href="Grpc.Core.AsyncClientStreamingCall-2.html">AsyncClientStreamingCall&lt;TRequest, TResponse&gt;</a>
  141. representing an asynchronous client-streaming invocation.
  142. The interceptor can simply return the return value of the
  143. continuation delegate passed to it intact, or construct its
  144. own substitute as it sees fit.</p>
  145. </td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. <h5 class="typeParameters">Type Parameters</h5>
  150. <table class="table table-bordered table-striped table-condensed">
  151. <thead>
  152. <tr>
  153. <th>Name</th>
  154. <th>Description</th>
  155. </tr>
  156. </thead>
  157. <tbody>
  158. <tr>
  159. <td><span class="parametername">TRequest</span></td>
  160. <td></td>
  161. </tr>
  162. <tr>
  163. <td><span class="parametername">TResponse</span></td>
  164. <td></td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <a id="Grpc_Core_Interceptors_Interceptor_AsyncDuplexStreamingCall_" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncDuplexStreamingCall*"></a>
  169. <h4 id="Grpc_Core_Interceptors_Interceptor_AsyncDuplexStreamingCall__2_Grpc_Core_Interceptors_ClientInterceptorContext___0___1__Grpc_Core_Interceptors_Interceptor_AsyncDuplexStreamingCallContinuation___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncDuplexStreamingCall``2(Grpc.Core.Interceptors.ClientInterceptorContext{``0,``1},Grpc.Core.Interceptors.Interceptor.AsyncDuplexStreamingCallContinuation{``0,``1})">AsyncDuplexStreamingCall&lt;TRequest, TResponse&gt;(ClientInterceptorContext&lt;TRequest, TResponse&gt;, Interceptor.AsyncDuplexStreamingCallContinuation&lt;TRequest, TResponse&gt;)</h4>
  170. <div class="markdown level1 summary"><p>Intercepts an asynchronous invocation of a duplex streaming call.</p>
  171. </div>
  172. <div class="markdown level1 conceptual"></div>
  173. <h5 class="decalaration">Declaration</h5>
  174. <div class="codewrapper">
  175. <pre><code class="lang-csharp hljs">public virtual AsyncDuplexStreamingCall&lt;TRequest, TResponse&gt; AsyncDuplexStreamingCall&lt;TRequest, TResponse&gt;(ClientInterceptorContext&lt;TRequest, TResponse&gt; context, Interceptor.AsyncDuplexStreamingCallContinuation&lt;TRequest, TResponse&gt; continuation)
  176. where TRequest : class where TResponse : class</code></pre>
  177. </div>
  178. <h5 class="parameters">Parameters</h5>
  179. <table class="table table-bordered table-striped table-condensed">
  180. <thead>
  181. <tr>
  182. <th>Type</th>
  183. <th>Name</th>
  184. <th>Description</th>
  185. </tr>
  186. </thead>
  187. <tbody>
  188. <tr>
  189. <td><a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext</a>&lt;TRequest, TResponse&gt;</td>
  190. <td><span class="parametername">context</span></td>
  191. <td><p>The <a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext&lt;TRequest, TResponse&gt;</a>
  192. associated with the current invocation.</p>
  193. </td>
  194. </tr>
  195. <tr>
  196. <td><a class="xref" href="Grpc.Core.Interceptors.Interceptor.AsyncDuplexStreamingCallContinuation-2.html">Interceptor.AsyncDuplexStreamingCallContinuation</a>&lt;TRequest, TResponse&gt;</td>
  197. <td><span class="parametername">continuation</span></td>
  198. <td><p>The callback that continues the invocation process.
  199. This can be invoked zero or more times by the interceptor.
  200. The interceptor can invoke the continuation passing the given
  201. context argument, or substitute as it sees fit.</p>
  202. </td>
  203. </tr>
  204. </tbody>
  205. </table>
  206. <h5 class="returns">Returns</h5>
  207. <table class="table table-bordered table-striped table-condensed">
  208. <thead>
  209. <tr>
  210. <th>Type</th>
  211. <th>Description</th>
  212. </tr>
  213. </thead>
  214. <tbody>
  215. <tr>
  216. <td><a class="xref" href="Grpc.Core.AsyncDuplexStreamingCall-2.html">AsyncDuplexStreamingCall</a>&lt;TRequest, TResponse&gt;</td>
  217. <td><p>An instance of <a class="xref" href="Grpc.Core.AsyncDuplexStreamingCall-2.html">AsyncDuplexStreamingCall&lt;TRequest, TResponse&gt;</a>
  218. representing an asynchronous duplex-streaming invocation.
  219. The interceptor can simply return the return value of the
  220. continuation delegate passed to it intact, or construct its
  221. own substitute as it sees fit.</p>
  222. </td>
  223. </tr>
  224. </tbody>
  225. </table>
  226. <h5 class="typeParameters">Type Parameters</h5>
  227. <table class="table table-bordered table-striped table-condensed">
  228. <thead>
  229. <tr>
  230. <th>Name</th>
  231. <th>Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td><span class="parametername">TRequest</span></td>
  237. <td></td>
  238. </tr>
  239. <tr>
  240. <td><span class="parametername">TResponse</span></td>
  241. <td></td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. <a id="Grpc_Core_Interceptors_Interceptor_AsyncServerStreamingCall_" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncServerStreamingCall*"></a>
  246. <h4 id="Grpc_Core_Interceptors_Interceptor_AsyncServerStreamingCall__2___0_Grpc_Core_Interceptors_ClientInterceptorContext___0___1__Grpc_Core_Interceptors_Interceptor_AsyncServerStreamingCallContinuation___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncServerStreamingCall``2(``0,Grpc.Core.Interceptors.ClientInterceptorContext{``0,``1},Grpc.Core.Interceptors.Interceptor.AsyncServerStreamingCallContinuation{``0,``1})">AsyncServerStreamingCall&lt;TRequest, TResponse&gt;(TRequest, ClientInterceptorContext&lt;TRequest, TResponse&gt;, Interceptor.AsyncServerStreamingCallContinuation&lt;TRequest, TResponse&gt;)</h4>
  247. <div class="markdown level1 summary"><p>Intercepts an asynchronous invocation of a streaming remote call.</p>
  248. </div>
  249. <div class="markdown level1 conceptual"></div>
  250. <h5 class="decalaration">Declaration</h5>
  251. <div class="codewrapper">
  252. <pre><code class="lang-csharp hljs">public virtual AsyncServerStreamingCall&lt;TResponse&gt; AsyncServerStreamingCall&lt;TRequest, TResponse&gt;(TRequest request, ClientInterceptorContext&lt;TRequest, TResponse&gt; context, Interceptor.AsyncServerStreamingCallContinuation&lt;TRequest, TResponse&gt; continuation)
  253. where TRequest : class where TResponse : class</code></pre>
  254. </div>
  255. <h5 class="parameters">Parameters</h5>
  256. <table class="table table-bordered table-striped table-condensed">
  257. <thead>
  258. <tr>
  259. <th>Type</th>
  260. <th>Name</th>
  261. <th>Description</th>
  262. </tr>
  263. </thead>
  264. <tbody>
  265. <tr>
  266. <td><span class="xref">TRequest</span></td>
  267. <td><span class="parametername">request</span></td>
  268. <td><p>The request message of the invocation.</p>
  269. </td>
  270. </tr>
  271. <tr>
  272. <td><a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext</a>&lt;TRequest, TResponse&gt;</td>
  273. <td><span class="parametername">context</span></td>
  274. <td><p>The <a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext&lt;TRequest, TResponse&gt;</a>
  275. associated with the current invocation.</p>
  276. </td>
  277. </tr>
  278. <tr>
  279. <td><a class="xref" href="Grpc.Core.Interceptors.Interceptor.AsyncServerStreamingCallContinuation-2.html">Interceptor.AsyncServerStreamingCallContinuation</a>&lt;TRequest, TResponse&gt;</td>
  280. <td><span class="parametername">continuation</span></td>
  281. <td><p>The callback that continues the invocation process.
  282. This can be invoked zero or more times by the interceptor.
  283. The interceptor can invoke the continuation passing the given
  284. request value and context arguments, or substitute them as it sees fit.</p>
  285. </td>
  286. </tr>
  287. </tbody>
  288. </table>
  289. <h5 class="returns">Returns</h5>
  290. <table class="table table-bordered table-striped table-condensed">
  291. <thead>
  292. <tr>
  293. <th>Type</th>
  294. <th>Description</th>
  295. </tr>
  296. </thead>
  297. <tbody>
  298. <tr>
  299. <td><a class="xref" href="Grpc.Core.AsyncServerStreamingCall-1.html">AsyncServerStreamingCall</a>&lt;TResponse&gt;</td>
  300. <td><p>An instance of <a class="xref" href="Grpc.Core.AsyncServerStreamingCall-1.html">AsyncServerStreamingCall&lt;TResponse&gt;</a>
  301. representing an asynchronous server-streaming invocation.
  302. The interceptor can simply return the return value of the
  303. continuation delegate passed to it intact, or construct its
  304. own substitute as it sees fit.</p>
  305. </td>
  306. </tr>
  307. </tbody>
  308. </table>
  309. <h5 class="typeParameters">Type Parameters</h5>
  310. <table class="table table-bordered table-striped table-condensed">
  311. <thead>
  312. <tr>
  313. <th>Name</th>
  314. <th>Description</th>
  315. </tr>
  316. </thead>
  317. <tbody>
  318. <tr>
  319. <td><span class="parametername">TRequest</span></td>
  320. <td></td>
  321. </tr>
  322. <tr>
  323. <td><span class="parametername">TResponse</span></td>
  324. <td></td>
  325. </tr>
  326. </tbody>
  327. </table>
  328. <a id="Grpc_Core_Interceptors_Interceptor_AsyncUnaryCall_" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncUnaryCall*"></a>
  329. <h4 id="Grpc_Core_Interceptors_Interceptor_AsyncUnaryCall__2___0_Grpc_Core_Interceptors_ClientInterceptorContext___0___1__Grpc_Core_Interceptors_Interceptor_AsyncUnaryCallContinuation___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.AsyncUnaryCall``2(``0,Grpc.Core.Interceptors.ClientInterceptorContext{``0,``1},Grpc.Core.Interceptors.Interceptor.AsyncUnaryCallContinuation{``0,``1})">AsyncUnaryCall&lt;TRequest, TResponse&gt;(TRequest, ClientInterceptorContext&lt;TRequest, TResponse&gt;, Interceptor.AsyncUnaryCallContinuation&lt;TRequest, TResponse&gt;)</h4>
  330. <div class="markdown level1 summary"><p>Intercepts an asynchronous invocation of a simple remote call.</p>
  331. </div>
  332. <div class="markdown level1 conceptual"></div>
  333. <h5 class="decalaration">Declaration</h5>
  334. <div class="codewrapper">
  335. <pre><code class="lang-csharp hljs">public virtual AsyncUnaryCall&lt;TResponse&gt; AsyncUnaryCall&lt;TRequest, TResponse&gt;(TRequest request, ClientInterceptorContext&lt;TRequest, TResponse&gt; context, Interceptor.AsyncUnaryCallContinuation&lt;TRequest, TResponse&gt; continuation)
  336. where TRequest : class where TResponse : class</code></pre>
  337. </div>
  338. <h5 class="parameters">Parameters</h5>
  339. <table class="table table-bordered table-striped table-condensed">
  340. <thead>
  341. <tr>
  342. <th>Type</th>
  343. <th>Name</th>
  344. <th>Description</th>
  345. </tr>
  346. </thead>
  347. <tbody>
  348. <tr>
  349. <td><span class="xref">TRequest</span></td>
  350. <td><span class="parametername">request</span></td>
  351. <td><p>The request message of the invocation.</p>
  352. </td>
  353. </tr>
  354. <tr>
  355. <td><a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext</a>&lt;TRequest, TResponse&gt;</td>
  356. <td><span class="parametername">context</span></td>
  357. <td><p>The <a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext&lt;TRequest, TResponse&gt;</a>
  358. associated with the current invocation.</p>
  359. </td>
  360. </tr>
  361. <tr>
  362. <td><a class="xref" href="Grpc.Core.Interceptors.Interceptor.AsyncUnaryCallContinuation-2.html">Interceptor.AsyncUnaryCallContinuation</a>&lt;TRequest, TResponse&gt;</td>
  363. <td><span class="parametername">continuation</span></td>
  364. <td><p>The callback that continues the invocation process.
  365. This can be invoked zero or more times by the interceptor.
  366. The interceptor can invoke the continuation passing the given
  367. request value and context arguments, or substitute them as it sees fit.</p>
  368. </td>
  369. </tr>
  370. </tbody>
  371. </table>
  372. <h5 class="returns">Returns</h5>
  373. <table class="table table-bordered table-striped table-condensed">
  374. <thead>
  375. <tr>
  376. <th>Type</th>
  377. <th>Description</th>
  378. </tr>
  379. </thead>
  380. <tbody>
  381. <tr>
  382. <td><a class="xref" href="Grpc.Core.AsyncUnaryCall-1.html">AsyncUnaryCall</a>&lt;TResponse&gt;</td>
  383. <td><p>An instance of <a class="xref" href="Grpc.Core.AsyncUnaryCall-1.html">AsyncUnaryCall&lt;TResponse&gt;</a>
  384. representing an asynchronous unary invocation.
  385. The interceptor can simply return the return value of the
  386. continuation delegate passed to it intact, or construct its
  387. own substitute as it sees fit.</p>
  388. </td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. <h5 class="typeParameters">Type Parameters</h5>
  393. <table class="table table-bordered table-striped table-condensed">
  394. <thead>
  395. <tr>
  396. <th>Name</th>
  397. <th>Description</th>
  398. </tr>
  399. </thead>
  400. <tbody>
  401. <tr>
  402. <td><span class="parametername">TRequest</span></td>
  403. <td></td>
  404. </tr>
  405. <tr>
  406. <td><span class="parametername">TResponse</span></td>
  407. <td></td>
  408. </tr>
  409. </tbody>
  410. </table>
  411. <a id="Grpc_Core_Interceptors_Interceptor_BlockingUnaryCall_" data-uid="Grpc.Core.Interceptors.Interceptor.BlockingUnaryCall*"></a>
  412. <h4 id="Grpc_Core_Interceptors_Interceptor_BlockingUnaryCall__2___0_Grpc_Core_Interceptors_ClientInterceptorContext___0___1__Grpc_Core_Interceptors_Interceptor_BlockingUnaryCallContinuation___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.BlockingUnaryCall``2(``0,Grpc.Core.Interceptors.ClientInterceptorContext{``0,``1},Grpc.Core.Interceptors.Interceptor.BlockingUnaryCallContinuation{``0,``1})">BlockingUnaryCall&lt;TRequest, TResponse&gt;(TRequest, ClientInterceptorContext&lt;TRequest, TResponse&gt;, Interceptor.BlockingUnaryCallContinuation&lt;TRequest, TResponse&gt;)</h4>
  413. <div class="markdown level1 summary"><p>Intercepts a blocking invocation of a simple remote call.</p>
  414. </div>
  415. <div class="markdown level1 conceptual"></div>
  416. <h5 class="decalaration">Declaration</h5>
  417. <div class="codewrapper">
  418. <pre><code class="lang-csharp hljs">public virtual TResponse BlockingUnaryCall&lt;TRequest, TResponse&gt;(TRequest request, ClientInterceptorContext&lt;TRequest, TResponse&gt; context, Interceptor.BlockingUnaryCallContinuation&lt;TRequest, TResponse&gt; continuation)
  419. where TRequest : class where TResponse : class</code></pre>
  420. </div>
  421. <h5 class="parameters">Parameters</h5>
  422. <table class="table table-bordered table-striped table-condensed">
  423. <thead>
  424. <tr>
  425. <th>Type</th>
  426. <th>Name</th>
  427. <th>Description</th>
  428. </tr>
  429. </thead>
  430. <tbody>
  431. <tr>
  432. <td><span class="xref">TRequest</span></td>
  433. <td><span class="parametername">request</span></td>
  434. <td><p>The request message of the invocation.</p>
  435. </td>
  436. </tr>
  437. <tr>
  438. <td><a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext</a>&lt;TRequest, TResponse&gt;</td>
  439. <td><span class="parametername">context</span></td>
  440. <td><p>The <a class="xref" href="Grpc.Core.Interceptors.ClientInterceptorContext-2.html">ClientInterceptorContext&lt;TRequest, TResponse&gt;</a>
  441. associated with the current invocation.</p>
  442. </td>
  443. </tr>
  444. <tr>
  445. <td><a class="xref" href="Grpc.Core.Interceptors.Interceptor.BlockingUnaryCallContinuation-2.html">Interceptor.BlockingUnaryCallContinuation</a>&lt;TRequest, TResponse&gt;</td>
  446. <td><span class="parametername">continuation</span></td>
  447. <td><p>The callback that continues the invocation process.
  448. This can be invoked zero or more times by the interceptor.
  449. The interceptor can invoke the continuation passing the given
  450. request value and context arguments, or substitute them as it sees fit.</p>
  451. </td>
  452. </tr>
  453. </tbody>
  454. </table>
  455. <h5 class="returns">Returns</h5>
  456. <table class="table table-bordered table-striped table-condensed">
  457. <thead>
  458. <tr>
  459. <th>Type</th>
  460. <th>Description</th>
  461. </tr>
  462. </thead>
  463. <tbody>
  464. <tr>
  465. <td><span class="xref">TResponse</span></td>
  466. <td><p>The response message of the current invocation.
  467. The interceptor can simply return the return value of the
  468. continuation delegate passed to it intact, or an arbitrary
  469. value as it sees fit.</p>
  470. </td>
  471. </tr>
  472. </tbody>
  473. </table>
  474. <h5 class="typeParameters">Type Parameters</h5>
  475. <table class="table table-bordered table-striped table-condensed">
  476. <thead>
  477. <tr>
  478. <th>Name</th>
  479. <th>Description</th>
  480. </tr>
  481. </thead>
  482. <tbody>
  483. <tr>
  484. <td><span class="parametername">TRequest</span></td>
  485. <td></td>
  486. </tr>
  487. <tr>
  488. <td><span class="parametername">TResponse</span></td>
  489. <td></td>
  490. </tr>
  491. </tbody>
  492. </table>
  493. <a id="Grpc_Core_Interceptors_Interceptor_ClientStreamingServerHandler_" data-uid="Grpc.Core.Interceptors.Interceptor.ClientStreamingServerHandler*"></a>
  494. <h4 id="Grpc_Core_Interceptors_Interceptor_ClientStreamingServerHandler__2_Grpc_Core_IAsyncStreamReader___0__Grpc_Core_ServerCallContext_Grpc_Core_ClientStreamingServerMethod___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.ClientStreamingServerHandler``2(Grpc.Core.IAsyncStreamReader{``0},Grpc.Core.ServerCallContext,Grpc.Core.ClientStreamingServerMethod{``0,``1})">ClientStreamingServerHandler&lt;TRequest, TResponse&gt;(IAsyncStreamReader&lt;TRequest&gt;, ServerCallContext, ClientStreamingServerMethod&lt;TRequest, TResponse&gt;)</h4>
  495. <div class="markdown level1 summary"><p>Server-side handler for intercepting client streaming call.</p>
  496. </div>
  497. <div class="markdown level1 conceptual"></div>
  498. <h5 class="decalaration">Declaration</h5>
  499. <div class="codewrapper">
  500. <pre><code class="lang-csharp hljs">public virtual Task&lt;TResponse&gt; ClientStreamingServerHandler&lt;TRequest, TResponse&gt;(IAsyncStreamReader&lt;TRequest&gt; requestStream, ServerCallContext context, ClientStreamingServerMethod&lt;TRequest, TResponse&gt; continuation)
  501. where TRequest : class where TResponse : class</code></pre>
  502. </div>
  503. <h5 class="parameters">Parameters</h5>
  504. <table class="table table-bordered table-striped table-condensed">
  505. <thead>
  506. <tr>
  507. <th>Type</th>
  508. <th>Name</th>
  509. <th>Description</th>
  510. </tr>
  511. </thead>
  512. <tbody>
  513. <tr>
  514. <td><a class="xref" href="Grpc.Core.IAsyncStreamReader-1.html">IAsyncStreamReader</a>&lt;TRequest&gt;</td>
  515. <td><span class="parametername">requestStream</span></td>
  516. <td><p>The request stream of the incoming invocation.</p>
  517. </td>
  518. </tr>
  519. <tr>
  520. <td><a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a></td>
  521. <td><span class="parametername">context</span></td>
  522. <td><p>An instance of <a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a> representing
  523. the context of the invocation.</p>
  524. </td>
  525. </tr>
  526. <tr>
  527. <td><a class="xref" href="Grpc.Core.ClientStreamingServerMethod-2.html">ClientStreamingServerMethod</a>&lt;TRequest, TResponse&gt;</td>
  528. <td><span class="parametername">continuation</span></td>
  529. <td><p>A delegate that asynchronously proceeds with the invocation, calling
  530. the next interceptor in the chain, or the service request handler,
  531. in case of the last interceptor and return the response value of
  532. the RPC. The interceptor can choose to call it zero or more times
  533. at its discretion.</p>
  534. </td>
  535. </tr>
  536. </tbody>
  537. </table>
  538. <h5 class="returns">Returns</h5>
  539. <table class="table table-bordered table-striped table-condensed">
  540. <thead>
  541. <tr>
  542. <th>Type</th>
  543. <th>Description</th>
  544. </tr>
  545. </thead>
  546. <tbody>
  547. <tr>
  548. <td><span class="xref">Task</span>&lt;TResponse&gt;</td>
  549. <td><p>A future representing the response value of the RPC. The interceptor
  550. can simply return the return value from the continuation intact,
  551. or an arbitrary response value as it sees fit. The interceptor has
  552. the ability to wrap or substitute the request stream when calling
  553. the continuation.</p>
  554. </td>
  555. </tr>
  556. </tbody>
  557. </table>
  558. <h5 class="typeParameters">Type Parameters</h5>
  559. <table class="table table-bordered table-striped table-condensed">
  560. <thead>
  561. <tr>
  562. <th>Name</th>
  563. <th>Description</th>
  564. </tr>
  565. </thead>
  566. <tbody>
  567. <tr>
  568. <td><span class="parametername">TRequest</span></td>
  569. <td><p>Request message type for this method.</p>
  570. </td>
  571. </tr>
  572. <tr>
  573. <td><span class="parametername">TResponse</span></td>
  574. <td><p>Response message type for this method.</p>
  575. </td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. <a id="Grpc_Core_Interceptors_Interceptor_DuplexStreamingServerHandler_" data-uid="Grpc.Core.Interceptors.Interceptor.DuplexStreamingServerHandler*"></a>
  580. <h4 id="Grpc_Core_Interceptors_Interceptor_DuplexStreamingServerHandler__2_Grpc_Core_IAsyncStreamReader___0__Grpc_Core_IServerStreamWriter___1__Grpc_Core_ServerCallContext_Grpc_Core_DuplexStreamingServerMethod___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.DuplexStreamingServerHandler``2(Grpc.Core.IAsyncStreamReader{``0},Grpc.Core.IServerStreamWriter{``1},Grpc.Core.ServerCallContext,Grpc.Core.DuplexStreamingServerMethod{``0,``1})">DuplexStreamingServerHandler&lt;TRequest, TResponse&gt;(IAsyncStreamReader&lt;TRequest&gt;, IServerStreamWriter&lt;TResponse&gt;, ServerCallContext, DuplexStreamingServerMethod&lt;TRequest, TResponse&gt;)</h4>
  581. <div class="markdown level1 summary"><p>Server-side handler for intercepting bidirectional streaming calls.</p>
  582. </div>
  583. <div class="markdown level1 conceptual"></div>
  584. <h5 class="decalaration">Declaration</h5>
  585. <div class="codewrapper">
  586. <pre><code class="lang-csharp hljs">public virtual Task DuplexStreamingServerHandler&lt;TRequest, TResponse&gt;(IAsyncStreamReader&lt;TRequest&gt; requestStream, IServerStreamWriter&lt;TResponse&gt; responseStream, ServerCallContext context, DuplexStreamingServerMethod&lt;TRequest, TResponse&gt; continuation)
  587. where TRequest : class where TResponse : class</code></pre>
  588. </div>
  589. <h5 class="parameters">Parameters</h5>
  590. <table class="table table-bordered table-striped table-condensed">
  591. <thead>
  592. <tr>
  593. <th>Type</th>
  594. <th>Name</th>
  595. <th>Description</th>
  596. </tr>
  597. </thead>
  598. <tbody>
  599. <tr>
  600. <td><a class="xref" href="Grpc.Core.IAsyncStreamReader-1.html">IAsyncStreamReader</a>&lt;TRequest&gt;</td>
  601. <td><span class="parametername">requestStream</span></td>
  602. <td><p>The request stream of the incoming invocation.</p>
  603. </td>
  604. </tr>
  605. <tr>
  606. <td><a class="xref" href="Grpc.Core.IServerStreamWriter-1.html">IServerStreamWriter</a>&lt;TResponse&gt;</td>
  607. <td><span class="parametername">responseStream</span></td>
  608. <td><p>The response stream of the incoming invocation.</p>
  609. </td>
  610. </tr>
  611. <tr>
  612. <td><a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a></td>
  613. <td><span class="parametername">context</span></td>
  614. <td><p>An instance of <a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a> representing
  615. the context of the invocation.</p>
  616. </td>
  617. </tr>
  618. <tr>
  619. <td><a class="xref" href="Grpc.Core.DuplexStreamingServerMethod-2.html">DuplexStreamingServerMethod</a>&lt;TRequest, TResponse&gt;</td>
  620. <td><span class="parametername">continuation</span></td>
  621. <td><p>A delegate that asynchronously proceeds with the invocation, calling
  622. the next interceptor in the chain, or the service request handler,
  623. in case of the last interceptor and the interceptor can choose to
  624. call it zero or more times at its discretion. The interceptor has
  625. the ability to wrap or substitute the request and response streams
  626. when calling the continuation.</p>
  627. </td>
  628. </tr>
  629. </tbody>
  630. </table>
  631. <h5 class="returns">Returns</h5>
  632. <table class="table table-bordered table-striped table-condensed">
  633. <thead>
  634. <tr>
  635. <th>Type</th>
  636. <th>Description</th>
  637. </tr>
  638. </thead>
  639. <tbody>
  640. <tr>
  641. <td><span class="xref">Task</span></td>
  642. <td></td>
  643. </tr>
  644. </tbody>
  645. </table>
  646. <h5 class="typeParameters">Type Parameters</h5>
  647. <table class="table table-bordered table-striped table-condensed">
  648. <thead>
  649. <tr>
  650. <th>Name</th>
  651. <th>Description</th>
  652. </tr>
  653. </thead>
  654. <tbody>
  655. <tr>
  656. <td><span class="parametername">TRequest</span></td>
  657. <td><p>Request message type for this method.</p>
  658. </td>
  659. </tr>
  660. <tr>
  661. <td><span class="parametername">TResponse</span></td>
  662. <td><p>Response message type for this method.</p>
  663. </td>
  664. </tr>
  665. </tbody>
  666. </table>
  667. <a id="Grpc_Core_Interceptors_Interceptor_ServerStreamingServerHandler_" data-uid="Grpc.Core.Interceptors.Interceptor.ServerStreamingServerHandler*"></a>
  668. <h4 id="Grpc_Core_Interceptors_Interceptor_ServerStreamingServerHandler__2___0_Grpc_Core_IServerStreamWriter___1__Grpc_Core_ServerCallContext_Grpc_Core_ServerStreamingServerMethod___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.ServerStreamingServerHandler``2(``0,Grpc.Core.IServerStreamWriter{``1},Grpc.Core.ServerCallContext,Grpc.Core.ServerStreamingServerMethod{``0,``1})">ServerStreamingServerHandler&lt;TRequest, TResponse&gt;(TRequest, IServerStreamWriter&lt;TResponse&gt;, ServerCallContext, ServerStreamingServerMethod&lt;TRequest, TResponse&gt;)</h4>
  669. <div class="markdown level1 summary"><p>Server-side handler for intercepting server streaming call.</p>
  670. </div>
  671. <div class="markdown level1 conceptual"></div>
  672. <h5 class="decalaration">Declaration</h5>
  673. <div class="codewrapper">
  674. <pre><code class="lang-csharp hljs">public virtual Task ServerStreamingServerHandler&lt;TRequest, TResponse&gt;(TRequest request, IServerStreamWriter&lt;TResponse&gt; responseStream, ServerCallContext context, ServerStreamingServerMethod&lt;TRequest, TResponse&gt; continuation)
  675. where TRequest : class where TResponse : class</code></pre>
  676. </div>
  677. <h5 class="parameters">Parameters</h5>
  678. <table class="table table-bordered table-striped table-condensed">
  679. <thead>
  680. <tr>
  681. <th>Type</th>
  682. <th>Name</th>
  683. <th>Description</th>
  684. </tr>
  685. </thead>
  686. <tbody>
  687. <tr>
  688. <td><span class="xref">TRequest</span></td>
  689. <td><span class="parametername">request</span></td>
  690. <td><p>The request value of the incoming invocation.</p>
  691. </td>
  692. </tr>
  693. <tr>
  694. <td><a class="xref" href="Grpc.Core.IServerStreamWriter-1.html">IServerStreamWriter</a>&lt;TResponse&gt;</td>
  695. <td><span class="parametername">responseStream</span></td>
  696. <td><p>The response stream of the incoming invocation.</p>
  697. </td>
  698. </tr>
  699. <tr>
  700. <td><a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a></td>
  701. <td><span class="parametername">context</span></td>
  702. <td><p>An instance of <a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a> representing
  703. the context of the invocation.</p>
  704. </td>
  705. </tr>
  706. <tr>
  707. <td><a class="xref" href="Grpc.Core.ServerStreamingServerMethod-2.html">ServerStreamingServerMethod</a>&lt;TRequest, TResponse&gt;</td>
  708. <td><span class="parametername">continuation</span></td>
  709. <td><p>A delegate that asynchronously proceeds with the invocation, calling
  710. the next interceptor in the chain, or the service request handler,
  711. in case of the last interceptor and the interceptor can choose to
  712. call it zero or more times at its discretion. The interceptor has
  713. the ability to wrap or substitute the request value and the response stream
  714. when calling the continuation.</p>
  715. </td>
  716. </tr>
  717. </tbody>
  718. </table>
  719. <h5 class="returns">Returns</h5>
  720. <table class="table table-bordered table-striped table-condensed">
  721. <thead>
  722. <tr>
  723. <th>Type</th>
  724. <th>Description</th>
  725. </tr>
  726. </thead>
  727. <tbody>
  728. <tr>
  729. <td><span class="xref">Task</span></td>
  730. <td></td>
  731. </tr>
  732. </tbody>
  733. </table>
  734. <h5 class="typeParameters">Type Parameters</h5>
  735. <table class="table table-bordered table-striped table-condensed">
  736. <thead>
  737. <tr>
  738. <th>Name</th>
  739. <th>Description</th>
  740. </tr>
  741. </thead>
  742. <tbody>
  743. <tr>
  744. <td><span class="parametername">TRequest</span></td>
  745. <td><p>Request message type for this method.</p>
  746. </td>
  747. </tr>
  748. <tr>
  749. <td><span class="parametername">TResponse</span></td>
  750. <td><p>Response message type for this method.</p>
  751. </td>
  752. </tr>
  753. </tbody>
  754. </table>
  755. <a id="Grpc_Core_Interceptors_Interceptor_UnaryServerHandler_" data-uid="Grpc.Core.Interceptors.Interceptor.UnaryServerHandler*"></a>
  756. <h4 id="Grpc_Core_Interceptors_Interceptor_UnaryServerHandler__2___0_Grpc_Core_ServerCallContext_Grpc_Core_UnaryServerMethod___0___1__" data-uid="Grpc.Core.Interceptors.Interceptor.UnaryServerHandler``2(``0,Grpc.Core.ServerCallContext,Grpc.Core.UnaryServerMethod{``0,``1})">UnaryServerHandler&lt;TRequest, TResponse&gt;(TRequest, ServerCallContext, UnaryServerMethod&lt;TRequest, TResponse&gt;)</h4>
  757. <div class="markdown level1 summary"><p>Server-side handler for intercepting and incoming unary call.</p>
  758. </div>
  759. <div class="markdown level1 conceptual"></div>
  760. <h5 class="decalaration">Declaration</h5>
  761. <div class="codewrapper">
  762. <pre><code class="lang-csharp hljs">public virtual Task&lt;TResponse&gt; UnaryServerHandler&lt;TRequest, TResponse&gt;(TRequest request, ServerCallContext context, UnaryServerMethod&lt;TRequest, TResponse&gt; continuation)
  763. where TRequest : class where TResponse : class</code></pre>
  764. </div>
  765. <h5 class="parameters">Parameters</h5>
  766. <table class="table table-bordered table-striped table-condensed">
  767. <thead>
  768. <tr>
  769. <th>Type</th>
  770. <th>Name</th>
  771. <th>Description</th>
  772. </tr>
  773. </thead>
  774. <tbody>
  775. <tr>
  776. <td><span class="xref">TRequest</span></td>
  777. <td><span class="parametername">request</span></td>
  778. <td><p>The request value of the incoming invocation.</p>
  779. </td>
  780. </tr>
  781. <tr>
  782. <td><a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a></td>
  783. <td><span class="parametername">context</span></td>
  784. <td><p>An instance of <a class="xref" href="Grpc.Core.ServerCallContext.html">ServerCallContext</a> representing
  785. the context of the invocation.</p>
  786. </td>
  787. </tr>
  788. <tr>
  789. <td><a class="xref" href="Grpc.Core.UnaryServerMethod-2.html">UnaryServerMethod</a>&lt;TRequest, TResponse&gt;</td>
  790. <td><span class="parametername">continuation</span></td>
  791. <td><p>A delegate that asynchronously proceeds with the invocation, calling
  792. the next interceptor in the chain, or the service request handler,
  793. in case of the last interceptor and return the response value of
  794. the RPC. The interceptor can choose to call it zero or more times
  795. at its discretion.</p>
  796. </td>
  797. </tr>
  798. </tbody>
  799. </table>
  800. <h5 class="returns">Returns</h5>
  801. <table class="table table-bordered table-striped table-condensed">
  802. <thead>
  803. <tr>
  804. <th>Type</th>
  805. <th>Description</th>
  806. </tr>
  807. </thead>
  808. <tbody>
  809. <tr>
  810. <td><span class="xref">Task</span>&lt;TResponse&gt;</td>
  811. <td><p>A future representing the response value of the RPC. The interceptor
  812. can simply return the return value from the continuation intact,
  813. or an arbitrary response value as it sees fit.</p>
  814. </td>
  815. </tr>
  816. </tbody>
  817. </table>
  818. <h5 class="typeParameters">Type Parameters</h5>
  819. <table class="table table-bordered table-striped table-condensed">
  820. <thead>
  821. <tr>
  822. <th>Name</th>
  823. <th>Description</th>
  824. </tr>
  825. </thead>
  826. <tbody>
  827. <tr>
  828. <td><span class="parametername">TRequest</span></td>
  829. <td><p>Request message type for this method.</p>
  830. </td>
  831. </tr>
  832. <tr>
  833. <td><span class="parametername">TResponse</span></td>
  834. <td><p>Response message type for this method.</p>
  835. </td>
  836. </tr>
  837. </tbody>
  838. </table>
  839. </article>
  840. </div>
  841. <div class="hidden-sm col-md-2" role="complementary">
  842. <div class="sideaffix">
  843. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  844. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  845. </nav>
  846. </div>
  847. </div>
  848. </div>
  849. </div>
  850. <footer>
  851. <div class="grad-bottom"></div>
  852. <div class="footer">
  853. <div class="container">
  854. <span class="pull-right">
  855. <a href="#top">Back to top</a>
  856. </span>
  857. <span>Generated by <strong>DocFX</strong></span>
  858. </div>
  859. </div>
  860. </footer>
  861. </div>
  862. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  863. <script type="text/javascript" src="../styles/docfx.js"></script>
  864. <script type="text/javascript" src="../styles/main.js"></script>
  865. </body>
  866. </html>