Grpc.Net.Client.GrpcChannelOptions.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 GrpcChannelOptions
  8. | gRPC for .NET </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class GrpcChannelOptions
  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.Net.Client.GrpcChannelOptions">
  73. <h1 id="Grpc_Net_Client_GrpcChannelOptions" data-uid="Grpc.Net.Client.GrpcChannelOptions" class="text-break">Class GrpcChannelOptions
  74. </h1>
  75. <div class="markdown level0 summary"><p>An options class for configuring a <a class="xref" href="Grpc.Net.Client.GrpcChannel.html">GrpcChannel</a>.</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">GrpcChannelOptions</span></div>
  82. </div>
  83. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Net.Client.html">Grpc.Net.Client</a></h6>
  84. <h6><strong>Assembly</strong>: Grpc.Net.Client.dll</h6>
  85. <h5 id="Grpc_Net_Client_GrpcChannelOptions_syntax">Syntax</h5>
  86. <div class="codewrapper">
  87. <pre><code class="lang-csharp hljs">public sealed class GrpcChannelOptions : object</code></pre>
  88. </div>
  89. <h3 id="constructors">Constructors
  90. </h3>
  91. <a id="Grpc_Net_Client_GrpcChannelOptions__ctor_" data-uid="Grpc.Net.Client.GrpcChannelOptions.#ctor*"></a>
  92. <h4 id="Grpc_Net_Client_GrpcChannelOptions__ctor" data-uid="Grpc.Net.Client.GrpcChannelOptions.#ctor">GrpcChannelOptions()</h4>
  93. <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Grpc.Net.Client.GrpcChannelOptions.html">GrpcChannelOptions</a> class.</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 GrpcChannelOptions()</code></pre>
  99. </div>
  100. <h3 id="properties">Properties
  101. </h3>
  102. <a id="Grpc_Net_Client_GrpcChannelOptions_CompressionProviders_" data-uid="Grpc.Net.Client.GrpcChannelOptions.CompressionProviders*"></a>
  103. <h4 id="Grpc_Net_Client_GrpcChannelOptions_CompressionProviders" data-uid="Grpc.Net.Client.GrpcChannelOptions.CompressionProviders">CompressionProviders</h4>
  104. <div class="markdown level1 summary"><p>Gets or sets a collection of compression providers.</p>
  105. </div>
  106. <div class="markdown level1 conceptual"></div>
  107. <h5 class="decalaration">Declaration</h5>
  108. <div class="codewrapper">
  109. <pre><code class="lang-csharp hljs">public IList&lt;ICompressionProvider&gt;? CompressionProviders { get; set; }</code></pre>
  110. </div>
  111. <h5 class="propertyValue">Property Value</h5>
  112. <table class="table table-bordered table-striped table-condensed">
  113. <thead>
  114. <tr>
  115. <th>Type</th>
  116. <th>Description</th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <tr>
  121. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">IList</span>&lt;<a class="xref" href="Grpc.Net.Compression.ICompressionProvider.html">ICompressionProvider</a>&gt;&gt;</td>
  122. <td></td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. <a id="Grpc_Net_Client_GrpcChannelOptions_Credentials_" data-uid="Grpc.Net.Client.GrpcChannelOptions.Credentials*"></a>
  127. <h4 id="Grpc_Net_Client_GrpcChannelOptions_Credentials" data-uid="Grpc.Net.Client.GrpcChannelOptions.Credentials">Credentials</h4>
  128. <div class="markdown level1 summary"><p>Gets or sets the credentials for the channel.</p>
  129. </div>
  130. <div class="markdown level1 conceptual"></div>
  131. <h5 class="decalaration">Declaration</h5>
  132. <div class="codewrapper">
  133. <pre><code class="lang-csharp hljs">public ChannelCredentials? Credentials { get; set; }</code></pre>
  134. </div>
  135. <h5 class="propertyValue">Property Value</h5>
  136. <table class="table table-bordered table-striped table-condensed">
  137. <thead>
  138. <tr>
  139. <th>Type</th>
  140. <th>Description</th>
  141. </tr>
  142. </thead>
  143. <tbody>
  144. <tr>
  145. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">ChannelCredentials</span>&gt;</td>
  146. <td></td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. <a id="Grpc_Net_Client_GrpcChannelOptions_DisposeHttpClient_" data-uid="Grpc.Net.Client.GrpcChannelOptions.DisposeHttpClient*"></a>
  151. <h4 id="Grpc_Net_Client_GrpcChannelOptions_DisposeHttpClient" data-uid="Grpc.Net.Client.GrpcChannelOptions.DisposeHttpClient">DisposeHttpClient</h4>
  152. <div class="markdown level1 summary"><p>Gets or sets a value indicating whether the underlying <see cref="!:System.Net.Http.HttpClient"></see> should be disposed
  153. when the <a class="xref" href="Grpc.Net.Client.GrpcChannel.html">GrpcChannel</a> instance is disposed. The default value is <code>false</code>.</p>
  154. </div>
  155. <div class="markdown level1 conceptual"></div>
  156. <h5 class="decalaration">Declaration</h5>
  157. <div class="codewrapper">
  158. <pre><code class="lang-csharp hljs">public bool DisposeHttpClient { get; set; }</code></pre>
  159. </div>
  160. <h5 class="propertyValue">Property Value</h5>
  161. <table class="table table-bordered table-striped table-condensed">
  162. <thead>
  163. <tr>
  164. <th>Type</th>
  165. <th>Description</th>
  166. </tr>
  167. </thead>
  168. <tbody>
  169. <tr>
  170. <td><span class="xref">System.Boolean</span></td>
  171. <td></td>
  172. </tr>
  173. </tbody>
  174. </table>
  175. <h5 id="Grpc_Net_Client_GrpcChannelOptions_DisposeHttpClient_remarks">Remarks</h5>
  176. <div class="markdown level1 remarks"><p>This setting is used when a <a class="xref" href="Grpc.Net.Client.GrpcChannelOptions.html#Grpc_Net_Client_GrpcChannelOptions_HttpClient">HttpClient</a> value is specified. If no <a class="xref" href="Grpc.Net.Client.GrpcChannelOptions.html#Grpc_Net_Client_GrpcChannelOptions_HttpClient">HttpClient</a> value is provided
  177. then the channel will create an <see cref="!:System.Net.Http.HttpClient"></see> instance that is always disposed when
  178. the channel is disposed.</p>
  179. </div>
  180. <a id="Grpc_Net_Client_GrpcChannelOptions_HttpClient_" data-uid="Grpc.Net.Client.GrpcChannelOptions.HttpClient*"></a>
  181. <h4 id="Grpc_Net_Client_GrpcChannelOptions_HttpClient" data-uid="Grpc.Net.Client.GrpcChannelOptions.HttpClient">HttpClient</h4>
  182. <div class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="Grpc.Net.Client.GrpcChannelOptions.html#Grpc_Net_Client_GrpcChannelOptions_HttpClient">HttpClient</a> used by the channel.</p>
  183. </div>
  184. <div class="markdown level1 conceptual"></div>
  185. <h5 class="decalaration">Declaration</h5>
  186. <div class="codewrapper">
  187. <pre><code class="lang-csharp hljs">public HttpClient? HttpClient { get; set; }</code></pre>
  188. </div>
  189. <h5 class="propertyValue">Property Value</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Description</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">HttpClient</span>&gt;</td>
  200. <td></td>
  201. </tr>
  202. </tbody>
  203. </table>
  204. <h5 id="Grpc_Net_Client_GrpcChannelOptions_HttpClient_remarks">Remarks</h5>
  205. <div class="markdown level1 remarks"><p>By default a <see cref="!:System.Net.Http.HttpClient"></see> specified here will not be disposed with the channel.
  206. To dispose the <see cref="!:System.Net.Http.HttpClient"></see> with the channel you must set <a class="xref" href="Grpc.Net.Client.GrpcChannelOptions.html#Grpc_Net_Client_GrpcChannelOptions_DisposeHttpClient">DisposeHttpClient</a>
  207. to <code>true</code>.</p>
  208. </div>
  209. <a id="Grpc_Net_Client_GrpcChannelOptions_LoggerFactory_" data-uid="Grpc.Net.Client.GrpcChannelOptions.LoggerFactory*"></a>
  210. <h4 id="Grpc_Net_Client_GrpcChannelOptions_LoggerFactory" data-uid="Grpc.Net.Client.GrpcChannelOptions.LoggerFactory">LoggerFactory</h4>
  211. <div class="markdown level1 summary"><p>Gets or sets the logger factory used by the channel.</p>
  212. </div>
  213. <div class="markdown level1 conceptual"></div>
  214. <h5 class="decalaration">Declaration</h5>
  215. <div class="codewrapper">
  216. <pre><code class="lang-csharp hljs">public ILoggerFactory? LoggerFactory { get; set; }</code></pre>
  217. </div>
  218. <h5 class="propertyValue">Property Value</h5>
  219. <table class="table table-bordered table-striped table-condensed">
  220. <thead>
  221. <tr>
  222. <th>Type</th>
  223. <th>Description</th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. <tr>
  228. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">ILoggerFactory</span>&gt;</td>
  229. <td></td>
  230. </tr>
  231. </tbody>
  232. </table>
  233. <a id="Grpc_Net_Client_GrpcChannelOptions_MaxReceiveMessageSize_" data-uid="Grpc.Net.Client.GrpcChannelOptions.MaxReceiveMessageSize*"></a>
  234. <h4 id="Grpc_Net_Client_GrpcChannelOptions_MaxReceiveMessageSize" data-uid="Grpc.Net.Client.GrpcChannelOptions.MaxReceiveMessageSize">MaxReceiveMessageSize</h4>
  235. <div class="markdown level1 summary"><p>Gets or sets the maximum message size in bytes that can be received by the client.</p>
  236. </div>
  237. <div class="markdown level1 conceptual"></div>
  238. <h5 class="decalaration">Declaration</h5>
  239. <div class="codewrapper">
  240. <pre><code class="lang-csharp hljs">public int? MaxReceiveMessageSize { get; set; }</code></pre>
  241. </div>
  242. <h5 class="propertyValue">Property Value</h5>
  243. <table class="table table-bordered table-striped table-condensed">
  244. <thead>
  245. <tr>
  246. <th>Type</th>
  247. <th>Description</th>
  248. </tr>
  249. </thead>
  250. <tbody>
  251. <tr>
  252. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">System.Int32</span>&gt;</td>
  253. <td></td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <a id="Grpc_Net_Client_GrpcChannelOptions_MaxSendMessageSize_" data-uid="Grpc.Net.Client.GrpcChannelOptions.MaxSendMessageSize*"></a>
  258. <h4 id="Grpc_Net_Client_GrpcChannelOptions_MaxSendMessageSize" data-uid="Grpc.Net.Client.GrpcChannelOptions.MaxSendMessageSize">MaxSendMessageSize</h4>
  259. <div class="markdown level1 summary"><p>Gets or sets the maximum message size in bytes that can be sent from the client.</p>
  260. </div>
  261. <div class="markdown level1 conceptual"></div>
  262. <h5 class="decalaration">Declaration</h5>
  263. <div class="codewrapper">
  264. <pre><code class="lang-csharp hljs">public int? MaxSendMessageSize { get; set; }</code></pre>
  265. </div>
  266. <h5 class="propertyValue">Property Value</h5>
  267. <table class="table table-bordered table-striped table-condensed">
  268. <thead>
  269. <tr>
  270. <th>Type</th>
  271. <th>Description</th>
  272. </tr>
  273. </thead>
  274. <tbody>
  275. <tr>
  276. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">System.Int32</span>&gt;</td>
  277. <td></td>
  278. </tr>
  279. </tbody>
  280. </table>
  281. <a id="Grpc_Net_Client_GrpcChannelOptions_ThrowOperationCanceledOnCancellation_" data-uid="Grpc.Net.Client.GrpcChannelOptions.ThrowOperationCanceledOnCancellation*"></a>
  282. <h4 id="Grpc_Net_Client_GrpcChannelOptions_ThrowOperationCanceledOnCancellation" data-uid="Grpc.Net.Client.GrpcChannelOptions.ThrowOperationCanceledOnCancellation">ThrowOperationCanceledOnCancellation</h4>
  283. <div class="markdown level1 summary"><p>Gets or sets a value indicating whether clients will throw <see cref="!:OperationCanceledException"></see> for a call when its
  284. <see cref="!:CallOptions.CancellationToken"></see> is triggered or its <see cref="!:CallOptions.Deadline"></see> is exceeded.
  285. The default value is <code>false</code>.
  286. Note: experimental API that can change or be removed without any prior notice.</p>
  287. </div>
  288. <div class="markdown level1 conceptual"></div>
  289. <h5 class="decalaration">Declaration</h5>
  290. <div class="codewrapper">
  291. <pre><code class="lang-csharp hljs">public bool ThrowOperationCanceledOnCancellation { get; set; }</code></pre>
  292. </div>
  293. <h5 class="propertyValue">Property Value</h5>
  294. <table class="table table-bordered table-striped table-condensed">
  295. <thead>
  296. <tr>
  297. <th>Type</th>
  298. <th>Description</th>
  299. </tr>
  300. </thead>
  301. <tbody>
  302. <tr>
  303. <td><span class="xref">System.Boolean</span></td>
  304. <td></td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. </article>
  309. </div>
  310. <div class="hidden-sm col-md-2" role="complementary">
  311. <div class="sideaffix">
  312. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  313. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  314. </nav>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. <footer>
  320. <div class="grad-bottom"></div>
  321. <div class="footer">
  322. <div class="container">
  323. <span class="pull-right">
  324. <a href="#top">Back to top</a>
  325. </span>
  326. <span>Generated by <strong>DocFX</strong></span>
  327. </div>
  328. </div>
  329. </footer>
  330. </div>
  331. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  332. <script type="text/javascript" src="../styles/docfx.js"></script>
  333. <script type="text/javascript" src="../styles/main.js"></script>
  334. </body>
  335. </html>