Grpc.Core.ChannelBase.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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 ChannelBase
  8. | gRPC C# </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ChannelBase
  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.ChannelBase">
  73. <h1 id="Grpc_Core_ChannelBase" data-uid="Grpc.Core.ChannelBase" class="text-break">Class ChannelBase
  74. </h1>
  75. <div class="markdown level0 summary"><p>Base class for gRPC channel. Channels are an abstraction of long-lived connections to remote servers.</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">ChannelBase</span></div>
  82. <div class="level2"><a class="xref" href="Grpc.Core.Channel.html">Channel</a></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <span class="xref">System.Object.Equals(System.Object)</span>
  88. </div>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.GetHashCode()</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetType()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.MemberwiseClone()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  103. </div>
  104. <div>
  105. <span class="xref">System.Object.ToString()</span>
  106. </div>
  107. </div>
  108. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  109. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  110. <h5 id="Grpc_Core_ChannelBase_syntax">Syntax</h5>
  111. <div class="codewrapper">
  112. <pre><code class="lang-csharp hljs">public abstract class ChannelBase</code></pre>
  113. </div>
  114. <h3 id="constructors">Constructors
  115. </h3>
  116. <a id="Grpc_Core_ChannelBase__ctor_" data-uid="Grpc.Core.ChannelBase.#ctor*"></a>
  117. <h4 id="Grpc_Core_ChannelBase__ctor_System_String_" data-uid="Grpc.Core.ChannelBase.#ctor(System.String)">ChannelBase(String)</h4>
  118. <div class="markdown level1 summary"><p>Initializes a new instance of <a class="xref" href="Grpc.Core.ChannelBase.html">ChannelBase</a> class that connects to a specific host.</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 ChannelBase(string target)</code></pre>
  124. </div>
  125. <h5 class="parameters">Parameters</h5>
  126. <table class="table table-bordered table-striped table-condensed">
  127. <thead>
  128. <tr>
  129. <th>Type</th>
  130. <th>Name</th>
  131. <th>Description</th>
  132. </tr>
  133. </thead>
  134. <tbody>
  135. <tr>
  136. <td><span class="xref">System.String</span></td>
  137. <td><span class="parametername">target</span></td>
  138. <td><p>Target of the channel.</p>
  139. </td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <h3 id="properties">Properties
  144. </h3>
  145. <a id="Grpc_Core_ChannelBase_Target_" data-uid="Grpc.Core.ChannelBase.Target*"></a>
  146. <h4 id="Grpc_Core_ChannelBase_Target" data-uid="Grpc.Core.ChannelBase.Target">Target</h4>
  147. <div class="markdown level1 summary"><p>The original target used to create the channel.</p>
  148. </div>
  149. <div class="markdown level1 conceptual"></div>
  150. <h5 class="decalaration">Declaration</h5>
  151. <div class="codewrapper">
  152. <pre><code class="lang-csharp hljs">public string Target { get; }</code></pre>
  153. </div>
  154. <h5 class="propertyValue">Property Value</h5>
  155. <table class="table table-bordered table-striped table-condensed">
  156. <thead>
  157. <tr>
  158. <th>Type</th>
  159. <th>Description</th>
  160. </tr>
  161. </thead>
  162. <tbody>
  163. <tr>
  164. <td><span class="xref">System.String</span></td>
  165. <td></td>
  166. </tr>
  167. </tbody>
  168. </table>
  169. <h3 id="methods">Methods
  170. </h3>
  171. <a id="Grpc_Core_ChannelBase_CreateCallInvoker_" data-uid="Grpc.Core.ChannelBase.CreateCallInvoker*"></a>
  172. <h4 id="Grpc_Core_ChannelBase_CreateCallInvoker" data-uid="Grpc.Core.ChannelBase.CreateCallInvoker">CreateCallInvoker()</h4>
  173. <div class="markdown level1 summary"><p>Create a new <a class="xref" href="Grpc.Core.CallInvoker.html">CallInvoker</a> for the channel.</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 abstract CallInvoker CreateCallInvoker()</code></pre>
  179. </div>
  180. <h5 class="returns">Returns</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.CallInvoker.html">CallInvoker</a></td>
  191. <td><p>A new <a class="xref" href="Grpc.Core.CallInvoker.html">CallInvoker</a>.</p>
  192. </td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. <a id="Grpc_Core_ChannelBase_ShutdownAsync_" data-uid="Grpc.Core.ChannelBase.ShutdownAsync*"></a>
  197. <h4 id="Grpc_Core_ChannelBase_ShutdownAsync" data-uid="Grpc.Core.ChannelBase.ShutdownAsync">ShutdownAsync()</h4>
  198. <div class="markdown level1 summary"><p>Shuts down the channel cleanly. It is strongly recommended to shutdown
  199. the channel once you stopped using it.</p>
  200. </div>
  201. <div class="markdown level1 conceptual"></div>
  202. <h5 class="decalaration">Declaration</h5>
  203. <div class="codewrapper">
  204. <pre><code class="lang-csharp hljs">public Task ShutdownAsync()</code></pre>
  205. </div>
  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><span class="xref">System.Threading.Tasks.Task</span></td>
  217. <td></td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. <h5 id="Grpc_Core_ChannelBase_ShutdownAsync_remarks">Remarks</h5>
  222. <div class="markdown level1 remarks"><p>Guidance for implementors:
  223. This method doesn&apos;t wait for all calls on this channel to finish (nor does
  224. it have to explicitly cancel all outstanding calls). It is user&apos;s responsibility to make sure
  225. all the calls on this channel have finished (successfully or with an error)
  226. before shutting down the channel to ensure channel shutdown won&apos;t impact
  227. the outcome of those remote calls.</p>
  228. </div>
  229. <a id="Grpc_Core_ChannelBase_ShutdownAsyncCore_" data-uid="Grpc.Core.ChannelBase.ShutdownAsyncCore*"></a>
  230. <h4 id="Grpc_Core_ChannelBase_ShutdownAsyncCore" data-uid="Grpc.Core.ChannelBase.ShutdownAsyncCore">ShutdownAsyncCore()</h4>
  231. <div class="markdown level1 summary"><p>Provides implementation of a non-virtual public member.</p>
  232. </div>
  233. <div class="markdown level1 conceptual"></div>
  234. <h5 class="decalaration">Declaration</h5>
  235. <div class="codewrapper">
  236. <pre><code class="lang-csharp hljs">protected virtual Task ShutdownAsyncCore()</code></pre>
  237. </div>
  238. <h5 class="returns">Returns</h5>
  239. <table class="table table-bordered table-striped table-condensed">
  240. <thead>
  241. <tr>
  242. <th>Type</th>
  243. <th>Description</th>
  244. </tr>
  245. </thead>
  246. <tbody>
  247. <tr>
  248. <td><span class="xref">System.Threading.Tasks.Task</span></td>
  249. <td></td>
  250. </tr>
  251. </tbody>
  252. </table>
  253. <h3 id="extensionmethods">Extension Methods</h3>
  254. <div>
  255. <a class="xref" href="Grpc.Core.Interceptors.ChannelExtensions.html#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_Grpc_Core_Interceptors_Interceptor_">ChannelExtensions.Intercept(ChannelBase, Interceptor)</a>
  256. </div>
  257. <div>
  258. <a class="xref" href="Grpc.Core.Interceptors.ChannelExtensions.html#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_Grpc_Core_Interceptors_Interceptor___">ChannelExtensions.Intercept(ChannelBase, Interceptor[])</a>
  259. </div>
  260. <div>
  261. <a class="xref" href="Grpc.Core.Interceptors.ChannelExtensions.html#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_System_Func_Grpc_Core_Metadata_Grpc_Core_Metadata__">ChannelExtensions.Intercept(ChannelBase, Func&lt;Metadata, Metadata&gt;)</a>
  262. </div>
  263. </article>
  264. </div>
  265. <div class="hidden-sm col-md-2" role="complementary">
  266. <div class="sideaffix">
  267. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  268. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  269. </nav>
  270. </div>
  271. </div>
  272. </div>
  273. </div>
  274. <footer>
  275. <div class="grad-bottom"></div>
  276. <div class="footer">
  277. <div class="container">
  278. <span class="pull-right">
  279. <a href="#top">Back to top</a>
  280. </span>
  281. <span>Generated by <strong>DocFX</strong></span>
  282. </div>
  283. </div>
  284. </footer>
  285. </div>
  286. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  287. <script type="text/javascript" src="../styles/docfx.js"></script>
  288. <script type="text/javascript" src="../styles/main.js"></script>
  289. </body>
  290. </html>