Grpc.Core.ClientBase-1.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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 ClientBase&lt;T&gt;
  8. | gRPC for .NET </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ClientBase&lt;T&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.ClientBase`1">
  73. <h1 id="Grpc_Core_ClientBase_1" data-uid="Grpc.Core.ClientBase`1" class="text-break">Class ClientBase&lt;T&gt;
  74. </h1>
  75. <div class="markdown level0 summary"><p>Generic base class for client-side stubs.</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"><a class="xref" href="Grpc.Core.ClientBase.html">ClientBase</a></div>
  82. <div class="level2"><span class="xref">ClientBase&lt;T&gt;</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <a class="xref" href="Grpc.Core.ClientBase.html#Grpc_Core_ClientBase_CallInvoker">ClientBase.CallInvoker</a>
  88. </div>
  89. </div>
  90. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  91. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  92. <h5 id="Grpc_Core_ClientBase_1_syntax">Syntax</h5>
  93. <div class="codewrapper">
  94. <pre><code class="lang-csharp hljs">public abstract class ClientBase&lt;T&gt; : ClientBase where T : ClientBase&lt;T&gt;</code></pre>
  95. </div>
  96. <h5 class="typeParameters">Type Parameters</h5>
  97. <table class="table table-bordered table-striped table-condensed">
  98. <thead>
  99. <tr>
  100. <th>Name</th>
  101. <th>Description</th>
  102. </tr>
  103. </thead>
  104. <tbody>
  105. <tr>
  106. <td><span class="parametername">T</span></td>
  107. <td></td>
  108. </tr>
  109. </tbody>
  110. </table>
  111. <h3 id="constructors">Constructors
  112. </h3>
  113. <a id="Grpc_Core_ClientBase_1__ctor_" data-uid="Grpc.Core.ClientBase`1.#ctor*"></a>
  114. <h4 id="Grpc_Core_ClientBase_1__ctor" data-uid="Grpc.Core.ClientBase`1.#ctor">ClientBase()</h4>
  115. <div class="markdown level1 summary"><p>Initializes a new instance of <code>ClientBase</code> class that
  116. throws <code>NotImplementedException</code> upon invocation of any RPC.
  117. This constructor is only provided to allow creation of test doubles
  118. for client classes (e.g. mocking requires a parameterless constructor).</p>
  119. </div>
  120. <div class="markdown level1 conceptual"></div>
  121. <h5 class="decalaration">Declaration</h5>
  122. <div class="codewrapper">
  123. <pre><code class="lang-csharp hljs">protected ClientBase()</code></pre>
  124. </div>
  125. <a id="Grpc_Core_ClientBase_1__ctor_" data-uid="Grpc.Core.ClientBase`1.#ctor*"></a>
  126. <h4 id="Grpc_Core_ClientBase_1__ctor_Grpc_Core_CallInvoker_" data-uid="Grpc.Core.ClientBase`1.#ctor(Grpc.Core.CallInvoker)">ClientBase(CallInvoker)</h4>
  127. <div class="markdown level1 summary"><p>Initializes a new instance of <code>ClientBase</code> class.</p>
  128. </div>
  129. <div class="markdown level1 conceptual"></div>
  130. <h5 class="decalaration">Declaration</h5>
  131. <div class="codewrapper">
  132. <pre><code class="lang-csharp hljs">public ClientBase(CallInvoker callInvoker)</code></pre>
  133. </div>
  134. <h5 class="parameters">Parameters</h5>
  135. <table class="table table-bordered table-striped table-condensed">
  136. <thead>
  137. <tr>
  138. <th>Type</th>
  139. <th>Name</th>
  140. <th>Description</th>
  141. </tr>
  142. </thead>
  143. <tbody>
  144. <tr>
  145. <td><a class="xref" href="Grpc.Core.CallInvoker.html">CallInvoker</a></td>
  146. <td><span class="parametername">callInvoker</span></td>
  147. <td><p>The <code>CallInvoker</code> for remote call invocation.</p>
  148. </td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <a id="Grpc_Core_ClientBase_1__ctor_" data-uid="Grpc.Core.ClientBase`1.#ctor*"></a>
  153. <h4 id="Grpc_Core_ClientBase_1__ctor_Grpc_Core_ChannelBase_" data-uid="Grpc.Core.ClientBase`1.#ctor(Grpc.Core.ChannelBase)">ClientBase(ChannelBase)</h4>
  154. <div class="markdown level1 summary"><p>Initializes a new instance of <code>ClientBase</code> class.</p>
  155. </div>
  156. <div class="markdown level1 conceptual"></div>
  157. <h5 class="decalaration">Declaration</h5>
  158. <div class="codewrapper">
  159. <pre><code class="lang-csharp hljs">public ClientBase(ChannelBase channel)</code></pre>
  160. </div>
  161. <h5 class="parameters">Parameters</h5>
  162. <table class="table table-bordered table-striped table-condensed">
  163. <thead>
  164. <tr>
  165. <th>Type</th>
  166. <th>Name</th>
  167. <th>Description</th>
  168. </tr>
  169. </thead>
  170. <tbody>
  171. <tr>
  172. <td><a class="xref" href="Grpc.Core.ChannelBase.html">ChannelBase</a></td>
  173. <td><span class="parametername">channel</span></td>
  174. <td><p>The channel to use for remote call invocation.</p>
  175. </td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. <a id="Grpc_Core_ClientBase_1__ctor_" data-uid="Grpc.Core.ClientBase`1.#ctor*"></a>
  180. <h4 id="Grpc_Core_ClientBase_1__ctor_Grpc_Core_ClientBase_ClientBaseConfiguration_" data-uid="Grpc.Core.ClientBase`1.#ctor(Grpc.Core.ClientBase.ClientBaseConfiguration)">ClientBase(ClientBase.ClientBaseConfiguration)</h4>
  181. <div class="markdown level1 summary"><p>Initializes a new instance of <code>ClientBase</code> class.</p>
  182. </div>
  183. <div class="markdown level1 conceptual"></div>
  184. <h5 class="decalaration">Declaration</h5>
  185. <div class="codewrapper">
  186. <pre><code class="lang-csharp hljs">protected ClientBase(ClientBase.ClientBaseConfiguration configuration)</code></pre>
  187. </div>
  188. <h5 class="parameters">Parameters</h5>
  189. <table class="table table-bordered table-striped table-condensed">
  190. <thead>
  191. <tr>
  192. <th>Type</th>
  193. <th>Name</th>
  194. <th>Description</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td><a class="xref" href="Grpc.Core.ClientBase.ClientBaseConfiguration.html">ClientBase.ClientBaseConfiguration</a></td>
  200. <td><span class="parametername">configuration</span></td>
  201. <td><p>The configuration.</p>
  202. </td>
  203. </tr>
  204. </tbody>
  205. </table>
  206. <h3 id="methods">Methods
  207. </h3>
  208. <a id="Grpc_Core_ClientBase_1_NewInstance_" data-uid="Grpc.Core.ClientBase`1.NewInstance*"></a>
  209. <h4 id="Grpc_Core_ClientBase_1_NewInstance_Grpc_Core_ClientBase_ClientBaseConfiguration_" data-uid="Grpc.Core.ClientBase`1.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)">NewInstance(ClientBase.ClientBaseConfiguration)</h4>
  210. <div class="markdown level1 summary"><p>Creates a new instance of client from given <code>ClientBaseConfiguration</code>.</p>
  211. </div>
  212. <div class="markdown level1 conceptual"></div>
  213. <h5 class="decalaration">Declaration</h5>
  214. <div class="codewrapper">
  215. <pre><code class="lang-csharp hljs">protected abstract T NewInstance(ClientBase.ClientBaseConfiguration configuration)</code></pre>
  216. </div>
  217. <h5 class="parameters">Parameters</h5>
  218. <table class="table table-bordered table-striped table-condensed">
  219. <thead>
  220. <tr>
  221. <th>Type</th>
  222. <th>Name</th>
  223. <th>Description</th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. <tr>
  228. <td><a class="xref" href="Grpc.Core.ClientBase.ClientBaseConfiguration.html">ClientBase.ClientBaseConfiguration</a></td>
  229. <td><span class="parametername">configuration</span></td>
  230. <td></td>
  231. </tr>
  232. </tbody>
  233. </table>
  234. <h5 class="returns">Returns</h5>
  235. <table class="table table-bordered table-striped table-condensed">
  236. <thead>
  237. <tr>
  238. <th>Type</th>
  239. <th>Description</th>
  240. </tr>
  241. </thead>
  242. <tbody>
  243. <tr>
  244. <td><span class="xref">T</span></td>
  245. <td></td>
  246. </tr>
  247. </tbody>
  248. </table>
  249. <a id="Grpc_Core_ClientBase_1_WithHost_" data-uid="Grpc.Core.ClientBase`1.WithHost*"></a>
  250. <h4 id="Grpc_Core_ClientBase_1_WithHost_System_String_" data-uid="Grpc.Core.ClientBase`1.WithHost(System.String)">WithHost(String)</h4>
  251. <div class="markdown level1 summary"><p>Creates a new client that sets host field for calls explicitly.
  252. gRPC supports multiple &quot;hosts&quot; being served by a single server.
  253. By default (if a client was not created by calling this method),
  254. host <code>null</code> with the meaning &quot;use default host&quot; is used.</p>
  255. </div>
  256. <div class="markdown level1 conceptual"></div>
  257. <h5 class="decalaration">Declaration</h5>
  258. <div class="codewrapper">
  259. <pre><code class="lang-csharp hljs">public T WithHost(string host)</code></pre>
  260. </div>
  261. <h5 class="parameters">Parameters</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Name</th>
  267. <th>Description</th>
  268. </tr>
  269. </thead>
  270. <tbody>
  271. <tr>
  272. <td><span class="xref">System.String</span></td>
  273. <td><span class="parametername">host</span></td>
  274. <td></td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. <h5 class="returns">Returns</h5>
  279. <table class="table table-bordered table-striped table-condensed">
  280. <thead>
  281. <tr>
  282. <th>Type</th>
  283. <th>Description</th>
  284. </tr>
  285. </thead>
  286. <tbody>
  287. <tr>
  288. <td><span class="xref">T</span></td>
  289. <td></td>
  290. </tr>
  291. </tbody>
  292. </table>
  293. </article>
  294. </div>
  295. <div class="hidden-sm col-md-2" role="complementary">
  296. <div class="sideaffix">
  297. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  298. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  299. </nav>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <footer>
  305. <div class="grad-bottom"></div>
  306. <div class="footer">
  307. <div class="container">
  308. <span class="pull-right">
  309. <a href="#top">Back to top</a>
  310. </span>
  311. <span>Generated by <strong>DocFX</strong></span>
  312. </div>
  313. </div>
  314. </footer>
  315. </div>
  316. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  317. <script type="text/javascript" src="../styles/docfx.js"></script>
  318. <script type="text/javascript" src="../styles/main.js"></script>
  319. </body>
  320. </html>