Grpc.Core.ClientBase-1.html 14 KB

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