Grpc.Core.Metadata.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  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 Metadata
  8. | gRPC C# </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Metadata
  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.Metadata">
  73. <h1 id="Grpc_Core_Metadata" data-uid="Grpc.Core.Metadata" class="text-break">Class Metadata
  74. </h1>
  75. <div class="markdown level0 summary"><p>A collection of metadata entries that can be exchanged during a call.
  76. gRPC supports these types of metadata:
  77. <ul><li>Request headersare sent by the client at the beginning of a remote call before any request messages are sent.</li><li>Response headersare sent by the server at the beginning of a remote call handler before any response messages are sent.</li><li>Response trailersare sent by the server at the end of a remote call along with resulting call status.</li></ul></p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><span class="xref">Metadata</span></div>
  84. </div>
  85. <div classs="implements">
  86. <h5>Implements</h5>
  87. <div><span class="xref">System.Collections.Generic.IList</span>&lt;<a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>&gt;</div>
  88. <div><span class="xref">System.Collections.Generic.ICollection</span>&lt;<a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>&gt;</div>
  89. <div><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>&gt;</div>
  90. <div><span class="xref">System.Collections.IEnumerable</span></div>
  91. </div>
  92. <div class="inheritedMembers">
  93. <h5>Inherited Members</h5>
  94. <div>
  95. <span class="xref">System.Object.Equals(System.Object)</span>
  96. </div>
  97. <div>
  98. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  99. </div>
  100. <div>
  101. <span class="xref">System.Object.GetHashCode()</span>
  102. </div>
  103. <div>
  104. <span class="xref">System.Object.GetType()</span>
  105. </div>
  106. <div>
  107. <span class="xref">System.Object.MemberwiseClone()</span>
  108. </div>
  109. <div>
  110. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  111. </div>
  112. <div>
  113. <span class="xref">System.Object.ToString()</span>
  114. </div>
  115. </div>
  116. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  117. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  118. <h5 id="Grpc_Core_Metadata_syntax">Syntax</h5>
  119. <div class="codewrapper">
  120. <pre><code class="lang-csharp hljs">public sealed class Metadata : IList&lt;Metadata.Entry&gt;, ICollection&lt;Metadata.Entry&gt;, IEnumerable&lt;Metadata.Entry&gt;, IEnumerable</code></pre>
  121. </div>
  122. <h3 id="constructors">Constructors
  123. </h3>
  124. <a id="Grpc_Core_Metadata__ctor_" data-uid="Grpc.Core.Metadata.#ctor*"></a>
  125. <h4 id="Grpc_Core_Metadata__ctor" data-uid="Grpc.Core.Metadata.#ctor">Metadata()</h4>
  126. <div class="markdown level1 summary"><p>Initializes a new instance of <code>Metadata</code>.</p>
  127. </div>
  128. <div class="markdown level1 conceptual"></div>
  129. <h5 class="decalaration">Declaration</h5>
  130. <div class="codewrapper">
  131. <pre><code class="lang-csharp hljs">public Metadata()</code></pre>
  132. </div>
  133. <h3 id="fields">Fields
  134. </h3>
  135. <h4 id="Grpc_Core_Metadata_BinaryHeaderSuffix" data-uid="Grpc.Core.Metadata.BinaryHeaderSuffix">BinaryHeaderSuffix</h4>
  136. <div class="markdown level1 summary"><p>All binary headers should have this suffix.</p>
  137. </div>
  138. <div class="markdown level1 conceptual"></div>
  139. <h5 class="decalaration">Declaration</h5>
  140. <div class="codewrapper">
  141. <pre><code class="lang-csharp hljs">public const string BinaryHeaderSuffix = &quot;-bin&quot;</code></pre>
  142. </div>
  143. <h5 class="fieldValue">Field Value</h5>
  144. <table class="table table-bordered table-striped table-condensed">
  145. <thead>
  146. <tr>
  147. <th>Type</th>
  148. <th>Description</th>
  149. </tr>
  150. </thead>
  151. <tbody>
  152. <tr>
  153. <td><span class="xref">System.String</span></td>
  154. <td></td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <h4 id="Grpc_Core_Metadata_Empty" data-uid="Grpc.Core.Metadata.Empty">Empty</h4>
  159. <div class="markdown level1 summary"><p>An read-only instance of metadata containing no entries.</p>
  160. </div>
  161. <div class="markdown level1 conceptual"></div>
  162. <h5 class="decalaration">Declaration</h5>
  163. <div class="codewrapper">
  164. <pre><code class="lang-csharp hljs">public static readonly Metadata Empty</code></pre>
  165. </div>
  166. <h5 class="fieldValue">Field Value</h5>
  167. <table class="table table-bordered table-striped table-condensed">
  168. <thead>
  169. <tr>
  170. <th>Type</th>
  171. <th>Description</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. <tr>
  176. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  177. <td></td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <h3 id="properties">Properties
  182. </h3>
  183. <a id="Grpc_Core_Metadata_Count_" data-uid="Grpc.Core.Metadata.Count*"></a>
  184. <h4 id="Grpc_Core_Metadata_Count" data-uid="Grpc.Core.Metadata.Count">Count</h4>
  185. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  186. </div>
  187. <div class="markdown level1 conceptual"></div>
  188. <h5 class="decalaration">Declaration</h5>
  189. <div class="codewrapper">
  190. <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
  191. </div>
  192. <h5 class="propertyValue">Property Value</h5>
  193. <table class="table table-bordered table-striped table-condensed">
  194. <thead>
  195. <tr>
  196. <th>Type</th>
  197. <th>Description</th>
  198. </tr>
  199. </thead>
  200. <tbody>
  201. <tr>
  202. <td><span class="xref">System.Int32</span></td>
  203. <td></td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <a id="Grpc_Core_Metadata_IsReadOnly_" data-uid="Grpc.Core.Metadata.IsReadOnly*"></a>
  208. <h4 id="Grpc_Core_Metadata_IsReadOnly" data-uid="Grpc.Core.Metadata.IsReadOnly">IsReadOnly</h4>
  209. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  210. </div>
  211. <div class="markdown level1 conceptual"></div>
  212. <h5 class="decalaration">Declaration</h5>
  213. <div class="codewrapper">
  214. <pre><code class="lang-csharp hljs">public bool IsReadOnly { get; }</code></pre>
  215. </div>
  216. <h5 class="propertyValue">Property Value</h5>
  217. <table class="table table-bordered table-striped table-condensed">
  218. <thead>
  219. <tr>
  220. <th>Type</th>
  221. <th>Description</th>
  222. </tr>
  223. </thead>
  224. <tbody>
  225. <tr>
  226. <td><span class="xref">System.Boolean</span></td>
  227. <td></td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <a id="Grpc_Core_Metadata_Item_" data-uid="Grpc.Core.Metadata.Item*"></a>
  232. <h4 id="Grpc_Core_Metadata_Item_System_Int32_" data-uid="Grpc.Core.Metadata.Item(System.Int32)">Item[Int32]</h4>
  233. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  234. </div>
  235. <div class="markdown level1 conceptual"></div>
  236. <h5 class="decalaration">Declaration</h5>
  237. <div class="codewrapper">
  238. <pre><code class="lang-csharp hljs">public Metadata.Entry this[int index] { get; set; }</code></pre>
  239. </div>
  240. <h5 class="parameters">Parameters</h5>
  241. <table class="table table-bordered table-striped table-condensed">
  242. <thead>
  243. <tr>
  244. <th>Type</th>
  245. <th>Name</th>
  246. <th>Description</th>
  247. </tr>
  248. </thead>
  249. <tbody>
  250. <tr>
  251. <td><span class="xref">System.Int32</span></td>
  252. <td><span class="parametername">index</span></td>
  253. <td></td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <h5 class="propertyValue">Property Value</h5>
  258. <table class="table table-bordered table-striped table-condensed">
  259. <thead>
  260. <tr>
  261. <th>Type</th>
  262. <th>Description</th>
  263. </tr>
  264. </thead>
  265. <tbody>
  266. <tr>
  267. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  268. <td></td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <h3 id="methods">Methods
  273. </h3>
  274. <a id="Grpc_Core_Metadata_Add_" data-uid="Grpc.Core.Metadata.Add*"></a>
  275. <h4 id="Grpc_Core_Metadata_Add_Grpc_Core_Metadata_Entry_" data-uid="Grpc.Core.Metadata.Add(Grpc.Core.Metadata.Entry)">Add(Metadata.Entry)</h4>
  276. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  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 void Add(Metadata.Entry item)</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><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  295. <td><span class="parametername">item</span></td>
  296. <td></td>
  297. </tr>
  298. </tbody>
  299. </table>
  300. <a id="Grpc_Core_Metadata_Add_" data-uid="Grpc.Core.Metadata.Add*"></a>
  301. <h4 id="Grpc_Core_Metadata_Add_System_String_System_Byte___" data-uid="Grpc.Core.Metadata.Add(System.String,System.Byte[])">Add(String, Byte[])</h4>
  302. <div class="markdown level1 summary"><p>Adds a new binary-valued metadata entry. See <code>Metadata.Entry</code> constructor for params.</p>
  303. </div>
  304. <div class="markdown level1 conceptual"></div>
  305. <h5 class="decalaration">Declaration</h5>
  306. <div class="codewrapper">
  307. <pre><code class="lang-csharp hljs">public void Add(string key, byte[] valueBytes)</code></pre>
  308. </div>
  309. <h5 class="parameters">Parameters</h5>
  310. <table class="table table-bordered table-striped table-condensed">
  311. <thead>
  312. <tr>
  313. <th>Type</th>
  314. <th>Name</th>
  315. <th>Description</th>
  316. </tr>
  317. </thead>
  318. <tbody>
  319. <tr>
  320. <td><span class="xref">System.String</span></td>
  321. <td><span class="parametername">key</span></td>
  322. <td></td>
  323. </tr>
  324. <tr>
  325. <td><span class="xref">System.Byte</span>[]</td>
  326. <td><span class="parametername">valueBytes</span></td>
  327. <td></td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. <a id="Grpc_Core_Metadata_Add_" data-uid="Grpc.Core.Metadata.Add*"></a>
  332. <h4 id="Grpc_Core_Metadata_Add_System_String_System_String_" data-uid="Grpc.Core.Metadata.Add(System.String,System.String)">Add(String, String)</h4>
  333. <div class="markdown level1 summary"><p>Adds a new ASCII-valued metadata entry. See <code>Metadata.Entry</code> constructor for params.</p>
  334. </div>
  335. <div class="markdown level1 conceptual"></div>
  336. <h5 class="decalaration">Declaration</h5>
  337. <div class="codewrapper">
  338. <pre><code class="lang-csharp hljs">public void Add(string key, string value)</code></pre>
  339. </div>
  340. <h5 class="parameters">Parameters</h5>
  341. <table class="table table-bordered table-striped table-condensed">
  342. <thead>
  343. <tr>
  344. <th>Type</th>
  345. <th>Name</th>
  346. <th>Description</th>
  347. </tr>
  348. </thead>
  349. <tbody>
  350. <tr>
  351. <td><span class="xref">System.String</span></td>
  352. <td><span class="parametername">key</span></td>
  353. <td></td>
  354. </tr>
  355. <tr>
  356. <td><span class="xref">System.String</span></td>
  357. <td><span class="parametername">value</span></td>
  358. <td></td>
  359. </tr>
  360. </tbody>
  361. </table>
  362. <a id="Grpc_Core_Metadata_Clear_" data-uid="Grpc.Core.Metadata.Clear*"></a>
  363. <h4 id="Grpc_Core_Metadata_Clear" data-uid="Grpc.Core.Metadata.Clear">Clear()</h4>
  364. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  365. </div>
  366. <div class="markdown level1 conceptual"></div>
  367. <h5 class="decalaration">Declaration</h5>
  368. <div class="codewrapper">
  369. <pre><code class="lang-csharp hljs">public void Clear()</code></pre>
  370. </div>
  371. <a id="Grpc_Core_Metadata_Contains_" data-uid="Grpc.Core.Metadata.Contains*"></a>
  372. <h4 id="Grpc_Core_Metadata_Contains_Grpc_Core_Metadata_Entry_" data-uid="Grpc.Core.Metadata.Contains(Grpc.Core.Metadata.Entry)">Contains(Metadata.Entry)</h4>
  373. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  374. </div>
  375. <div class="markdown level1 conceptual"></div>
  376. <h5 class="decalaration">Declaration</h5>
  377. <div class="codewrapper">
  378. <pre><code class="lang-csharp hljs">public bool Contains(Metadata.Entry item)</code></pre>
  379. </div>
  380. <h5 class="parameters">Parameters</h5>
  381. <table class="table table-bordered table-striped table-condensed">
  382. <thead>
  383. <tr>
  384. <th>Type</th>
  385. <th>Name</th>
  386. <th>Description</th>
  387. </tr>
  388. </thead>
  389. <tbody>
  390. <tr>
  391. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  392. <td><span class="parametername">item</span></td>
  393. <td></td>
  394. </tr>
  395. </tbody>
  396. </table>
  397. <h5 class="returns">Returns</h5>
  398. <table class="table table-bordered table-striped table-condensed">
  399. <thead>
  400. <tr>
  401. <th>Type</th>
  402. <th>Description</th>
  403. </tr>
  404. </thead>
  405. <tbody>
  406. <tr>
  407. <td><span class="xref">System.Boolean</span></td>
  408. <td></td>
  409. </tr>
  410. </tbody>
  411. </table>
  412. <a id="Grpc_Core_Metadata_CopyTo_" data-uid="Grpc.Core.Metadata.CopyTo*"></a>
  413. <h4 id="Grpc_Core_Metadata_CopyTo_Grpc_Core_Metadata_Entry___System_Int32_" data-uid="Grpc.Core.Metadata.CopyTo(Grpc.Core.Metadata.Entry[],System.Int32)">CopyTo(Metadata.Entry[], Int32)</h4>
  414. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  415. </div>
  416. <div class="markdown level1 conceptual"></div>
  417. <h5 class="decalaration">Declaration</h5>
  418. <div class="codewrapper">
  419. <pre><code class="lang-csharp hljs">public void CopyTo(Metadata.Entry[] array, int arrayIndex)</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><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>[]</td>
  433. <td><span class="parametername">array</span></td>
  434. <td></td>
  435. </tr>
  436. <tr>
  437. <td><span class="xref">System.Int32</span></td>
  438. <td><span class="parametername">arrayIndex</span></td>
  439. <td></td>
  440. </tr>
  441. </tbody>
  442. </table>
  443. <a id="Grpc_Core_Metadata_Get_" data-uid="Grpc.Core.Metadata.Get*"></a>
  444. <h4 id="Grpc_Core_Metadata_Get_System_String_" data-uid="Grpc.Core.Metadata.Get(System.String)">Get(String)</h4>
  445. <div class="markdown level1 summary"><p>Gets the last metadata entry with the specified key.
  446. If there are no matching entries then <code>null</code> is returned.</p>
  447. </div>
  448. <div class="markdown level1 conceptual"></div>
  449. <h5 class="decalaration">Declaration</h5>
  450. <div class="codewrapper">
  451. <pre><code class="lang-csharp hljs">public Metadata.Entry Get(string key)</code></pre>
  452. </div>
  453. <h5 class="parameters">Parameters</h5>
  454. <table class="table table-bordered table-striped table-condensed">
  455. <thead>
  456. <tr>
  457. <th>Type</th>
  458. <th>Name</th>
  459. <th>Description</th>
  460. </tr>
  461. </thead>
  462. <tbody>
  463. <tr>
  464. <td><span class="xref">System.String</span></td>
  465. <td><span class="parametername">key</span></td>
  466. <td></td>
  467. </tr>
  468. </tbody>
  469. </table>
  470. <h5 class="returns">Returns</h5>
  471. <table class="table table-bordered table-striped table-condensed">
  472. <thead>
  473. <tr>
  474. <th>Type</th>
  475. <th>Description</th>
  476. </tr>
  477. </thead>
  478. <tbody>
  479. <tr>
  480. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  481. <td></td>
  482. </tr>
  483. </tbody>
  484. </table>
  485. <a id="Grpc_Core_Metadata_GetAll_" data-uid="Grpc.Core.Metadata.GetAll*"></a>
  486. <h4 id="Grpc_Core_Metadata_GetAll_System_String_" data-uid="Grpc.Core.Metadata.GetAll(System.String)">GetAll(String)</h4>
  487. <div class="markdown level1 summary"><p>Gets all metadata entries with the specified key.</p>
  488. </div>
  489. <div class="markdown level1 conceptual"></div>
  490. <h5 class="decalaration">Declaration</h5>
  491. <div class="codewrapper">
  492. <pre><code class="lang-csharp hljs">public IEnumerable&lt;Metadata.Entry&gt; GetAll(string key)</code></pre>
  493. </div>
  494. <h5 class="parameters">Parameters</h5>
  495. <table class="table table-bordered table-striped table-condensed">
  496. <thead>
  497. <tr>
  498. <th>Type</th>
  499. <th>Name</th>
  500. <th>Description</th>
  501. </tr>
  502. </thead>
  503. <tbody>
  504. <tr>
  505. <td><span class="xref">System.String</span></td>
  506. <td><span class="parametername">key</span></td>
  507. <td></td>
  508. </tr>
  509. </tbody>
  510. </table>
  511. <h5 class="returns">Returns</h5>
  512. <table class="table table-bordered table-striped table-condensed">
  513. <thead>
  514. <tr>
  515. <th>Type</th>
  516. <th>Description</th>
  517. </tr>
  518. </thead>
  519. <tbody>
  520. <tr>
  521. <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>&gt;</td>
  522. <td></td>
  523. </tr>
  524. </tbody>
  525. </table>
  526. <a id="Grpc_Core_Metadata_GetEnumerator_" data-uid="Grpc.Core.Metadata.GetEnumerator*"></a>
  527. <h4 id="Grpc_Core_Metadata_GetEnumerator" data-uid="Grpc.Core.Metadata.GetEnumerator">GetEnumerator()</h4>
  528. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  529. </div>
  530. <div class="markdown level1 conceptual"></div>
  531. <h5 class="decalaration">Declaration</h5>
  532. <div class="codewrapper">
  533. <pre><code class="lang-csharp hljs">public IEnumerator&lt;Metadata.Entry&gt; GetEnumerator()</code></pre>
  534. </div>
  535. <h5 class="returns">Returns</h5>
  536. <table class="table table-bordered table-striped table-condensed">
  537. <thead>
  538. <tr>
  539. <th>Type</th>
  540. <th>Description</th>
  541. </tr>
  542. </thead>
  543. <tbody>
  544. <tr>
  545. <td><span class="xref">System.Collections.Generic.IEnumerator</span>&lt;<a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a>&gt;</td>
  546. <td></td>
  547. </tr>
  548. </tbody>
  549. </table>
  550. <a id="Grpc_Core_Metadata_GetValue_" data-uid="Grpc.Core.Metadata.GetValue*"></a>
  551. <h4 id="Grpc_Core_Metadata_GetValue_System_String_" data-uid="Grpc.Core.Metadata.GetValue(System.String)">GetValue(String)</h4>
  552. <div class="markdown level1 summary"><p>Gets the string value of the last metadata entry with the specified key.
  553. If the metadata entry is binary then an exception is thrown.
  554. If there are no matching entries then <code>null</code> is returned.</p>
  555. </div>
  556. <div class="markdown level1 conceptual"></div>
  557. <h5 class="decalaration">Declaration</h5>
  558. <div class="codewrapper">
  559. <pre><code class="lang-csharp hljs">public string GetValue(string key)</code></pre>
  560. </div>
  561. <h5 class="parameters">Parameters</h5>
  562. <table class="table table-bordered table-striped table-condensed">
  563. <thead>
  564. <tr>
  565. <th>Type</th>
  566. <th>Name</th>
  567. <th>Description</th>
  568. </tr>
  569. </thead>
  570. <tbody>
  571. <tr>
  572. <td><span class="xref">System.String</span></td>
  573. <td><span class="parametername">key</span></td>
  574. <td></td>
  575. </tr>
  576. </tbody>
  577. </table>
  578. <h5 class="returns">Returns</h5>
  579. <table class="table table-bordered table-striped table-condensed">
  580. <thead>
  581. <tr>
  582. <th>Type</th>
  583. <th>Description</th>
  584. </tr>
  585. </thead>
  586. <tbody>
  587. <tr>
  588. <td><span class="xref">System.String</span></td>
  589. <td></td>
  590. </tr>
  591. </tbody>
  592. </table>
  593. <a id="Grpc_Core_Metadata_GetValueBytes_" data-uid="Grpc.Core.Metadata.GetValueBytes*"></a>
  594. <h4 id="Grpc_Core_Metadata_GetValueBytes_System_String_" data-uid="Grpc.Core.Metadata.GetValueBytes(System.String)">GetValueBytes(String)</h4>
  595. <div class="markdown level1 summary"><p>Gets the bytes value of the last metadata entry with the specified key.
  596. If the metadata entry is not binary the string value will be returned as ASCII encoded bytes.
  597. If there are no matching entries then <code>null</code> is returned.</p>
  598. </div>
  599. <div class="markdown level1 conceptual"></div>
  600. <h5 class="decalaration">Declaration</h5>
  601. <div class="codewrapper">
  602. <pre><code class="lang-csharp hljs">public byte[] GetValueBytes(string key)</code></pre>
  603. </div>
  604. <h5 class="parameters">Parameters</h5>
  605. <table class="table table-bordered table-striped table-condensed">
  606. <thead>
  607. <tr>
  608. <th>Type</th>
  609. <th>Name</th>
  610. <th>Description</th>
  611. </tr>
  612. </thead>
  613. <tbody>
  614. <tr>
  615. <td><span class="xref">System.String</span></td>
  616. <td><span class="parametername">key</span></td>
  617. <td></td>
  618. </tr>
  619. </tbody>
  620. </table>
  621. <h5 class="returns">Returns</h5>
  622. <table class="table table-bordered table-striped table-condensed">
  623. <thead>
  624. <tr>
  625. <th>Type</th>
  626. <th>Description</th>
  627. </tr>
  628. </thead>
  629. <tbody>
  630. <tr>
  631. <td><span class="xref">System.Byte</span>[]</td>
  632. <td></td>
  633. </tr>
  634. </tbody>
  635. </table>
  636. <a id="Grpc_Core_Metadata_IndexOf_" data-uid="Grpc.Core.Metadata.IndexOf*"></a>
  637. <h4 id="Grpc_Core_Metadata_IndexOf_Grpc_Core_Metadata_Entry_" data-uid="Grpc.Core.Metadata.IndexOf(Grpc.Core.Metadata.Entry)">IndexOf(Metadata.Entry)</h4>
  638. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  639. </div>
  640. <div class="markdown level1 conceptual"></div>
  641. <h5 class="decalaration">Declaration</h5>
  642. <div class="codewrapper">
  643. <pre><code class="lang-csharp hljs">public int IndexOf(Metadata.Entry item)</code></pre>
  644. </div>
  645. <h5 class="parameters">Parameters</h5>
  646. <table class="table table-bordered table-striped table-condensed">
  647. <thead>
  648. <tr>
  649. <th>Type</th>
  650. <th>Name</th>
  651. <th>Description</th>
  652. </tr>
  653. </thead>
  654. <tbody>
  655. <tr>
  656. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  657. <td><span class="parametername">item</span></td>
  658. <td></td>
  659. </tr>
  660. </tbody>
  661. </table>
  662. <h5 class="returns">Returns</h5>
  663. <table class="table table-bordered table-striped table-condensed">
  664. <thead>
  665. <tr>
  666. <th>Type</th>
  667. <th>Description</th>
  668. </tr>
  669. </thead>
  670. <tbody>
  671. <tr>
  672. <td><span class="xref">System.Int32</span></td>
  673. <td></td>
  674. </tr>
  675. </tbody>
  676. </table>
  677. <a id="Grpc_Core_Metadata_Insert_" data-uid="Grpc.Core.Metadata.Insert*"></a>
  678. <h4 id="Grpc_Core_Metadata_Insert_System_Int32_Grpc_Core_Metadata_Entry_" data-uid="Grpc.Core.Metadata.Insert(System.Int32,Grpc.Core.Metadata.Entry)">Insert(Int32, Metadata.Entry)</h4>
  679. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  680. </div>
  681. <div class="markdown level1 conceptual"></div>
  682. <h5 class="decalaration">Declaration</h5>
  683. <div class="codewrapper">
  684. <pre><code class="lang-csharp hljs">public void Insert(int index, Metadata.Entry item)</code></pre>
  685. </div>
  686. <h5 class="parameters">Parameters</h5>
  687. <table class="table table-bordered table-striped table-condensed">
  688. <thead>
  689. <tr>
  690. <th>Type</th>
  691. <th>Name</th>
  692. <th>Description</th>
  693. </tr>
  694. </thead>
  695. <tbody>
  696. <tr>
  697. <td><span class="xref">System.Int32</span></td>
  698. <td><span class="parametername">index</span></td>
  699. <td></td>
  700. </tr>
  701. <tr>
  702. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  703. <td><span class="parametername">item</span></td>
  704. <td></td>
  705. </tr>
  706. </tbody>
  707. </table>
  708. <a id="Grpc_Core_Metadata_Remove_" data-uid="Grpc.Core.Metadata.Remove*"></a>
  709. <h4 id="Grpc_Core_Metadata_Remove_Grpc_Core_Metadata_Entry_" data-uid="Grpc.Core.Metadata.Remove(Grpc.Core.Metadata.Entry)">Remove(Metadata.Entry)</h4>
  710. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  711. </div>
  712. <div class="markdown level1 conceptual"></div>
  713. <h5 class="decalaration">Declaration</h5>
  714. <div class="codewrapper">
  715. <pre><code class="lang-csharp hljs">public bool Remove(Metadata.Entry item)</code></pre>
  716. </div>
  717. <h5 class="parameters">Parameters</h5>
  718. <table class="table table-bordered table-striped table-condensed">
  719. <thead>
  720. <tr>
  721. <th>Type</th>
  722. <th>Name</th>
  723. <th>Description</th>
  724. </tr>
  725. </thead>
  726. <tbody>
  727. <tr>
  728. <td><a class="xref" href="Grpc.Core.Metadata.Entry.html">Metadata.Entry</a></td>
  729. <td><span class="parametername">item</span></td>
  730. <td></td>
  731. </tr>
  732. </tbody>
  733. </table>
  734. <h5 class="returns">Returns</h5>
  735. <table class="table table-bordered table-striped table-condensed">
  736. <thead>
  737. <tr>
  738. <th>Type</th>
  739. <th>Description</th>
  740. </tr>
  741. </thead>
  742. <tbody>
  743. <tr>
  744. <td><span class="xref">System.Boolean</span></td>
  745. <td></td>
  746. </tr>
  747. </tbody>
  748. </table>
  749. <a id="Grpc_Core_Metadata_RemoveAt_" data-uid="Grpc.Core.Metadata.RemoveAt*"></a>
  750. <h4 id="Grpc_Core_Metadata_RemoveAt_System_Int32_" data-uid="Grpc.Core.Metadata.RemoveAt(System.Int32)">RemoveAt(Int32)</h4>
  751. <div class="markdown level1 summary"><span class="xref">IList`1</span>
  752. </div>
  753. <div class="markdown level1 conceptual"></div>
  754. <h5 class="decalaration">Declaration</h5>
  755. <div class="codewrapper">
  756. <pre><code class="lang-csharp hljs">public void RemoveAt(int index)</code></pre>
  757. </div>
  758. <h5 class="parameters">Parameters</h5>
  759. <table class="table table-bordered table-striped table-condensed">
  760. <thead>
  761. <tr>
  762. <th>Type</th>
  763. <th>Name</th>
  764. <th>Description</th>
  765. </tr>
  766. </thead>
  767. <tbody>
  768. <tr>
  769. <td><span class="xref">System.Int32</span></td>
  770. <td><span class="parametername">index</span></td>
  771. <td></td>
  772. </tr>
  773. </tbody>
  774. </table>
  775. <h3 id="eii">Explicit Interface Implementations
  776. </h3>
  777. <a id="Grpc_Core_Metadata_System_Collections_IEnumerable_GetEnumerator_" data-uid="Grpc.Core.Metadata.System#Collections#IEnumerable#GetEnumerator*"></a>
  778. <h4 id="Grpc_Core_Metadata_System_Collections_IEnumerable_GetEnumerator" data-uid="Grpc.Core.Metadata.System#Collections#IEnumerable#GetEnumerator">IEnumerable.GetEnumerator()</h4>
  779. <div class="markdown level1 summary"></div>
  780. <div class="markdown level1 conceptual"></div>
  781. <h5 class="decalaration">Declaration</h5>
  782. <div class="codewrapper">
  783. <pre><code class="lang-csharp hljs">IEnumerator IEnumerable.GetEnumerator()</code></pre>
  784. </div>
  785. <h5 class="returns">Returns</h5>
  786. <table class="table table-bordered table-striped table-condensed">
  787. <thead>
  788. <tr>
  789. <th>Type</th>
  790. <th>Description</th>
  791. </tr>
  792. </thead>
  793. <tbody>
  794. <tr>
  795. <td><span class="xref">System.Collections.IEnumerator</span></td>
  796. <td></td>
  797. </tr>
  798. </tbody>
  799. </table>
  800. <h3 id="implements">Implements</h3>
  801. <div>
  802. <span class="xref">System.Collections.Generic.IList&lt;T&gt;</span>
  803. </div>
  804. <div>
  805. <span class="xref">System.Collections.Generic.ICollection&lt;T&gt;</span>
  806. </div>
  807. <div>
  808. <span class="xref">System.Collections.Generic.IEnumerable&lt;T&gt;</span>
  809. </div>
  810. <div>
  811. <span class="xref">System.Collections.IEnumerable</span>
  812. </div>
  813. </article>
  814. </div>
  815. <div class="hidden-sm col-md-2" role="complementary">
  816. <div class="sideaffix">
  817. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  818. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  819. </nav>
  820. </div>
  821. </div>
  822. </div>
  823. </div>
  824. <footer>
  825. <div class="grad-bottom"></div>
  826. <div class="footer">
  827. <div class="container">
  828. <span class="pull-right">
  829. <a href="#top">Back to top</a>
  830. </span>
  831. <span>Generated by <strong>DocFX</strong></span>
  832. </div>
  833. </div>
  834. </footer>
  835. </div>
  836. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  837. <script type="text/javascript" src="../styles/docfx.js"></script>
  838. <script type="text/javascript" src="../styles/main.js"></script>
  839. </body>
  840. </html>