You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

619 lines
28 KiB

  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 PropertyAccessor&lt;T, U&gt;
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class PropertyAccessor&lt;T, U&gt;
  11. ">
  12. <meta name="generator" content="docfx 2.48.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. <link rel="stylesheet" href="../styles/fix.css">
  18. <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../">
  22. <meta property="docfx:newtab" content="true">
  23. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  24. <div id="wrapper">
  25. <header>
  26. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  27. <div class="container">
  28. <div class="navbar-header">
  29. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  30. <span class="sr-only">Toggle navigation</span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. <a class="navbar-brand" href="../index.html">
  36. <img id="logo" class="svg" src="../logo.svg" alt="">
  37. </a>
  38. </div>
  39. <div class="collapse navbar-collapse" id="navbar">
  40. <form class="navbar-form navbar-right" role="search" id="search">
  41. <div class="form-group">
  42. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  43. </div>
  44. </form>
  45. </div>
  46. </div>
  47. </nav>
  48. <div class="subnav navbar navbar-default">
  49. <div class="container hide-when-search" id="breadcrumb">
  50. <ul class="breadcrumb">
  51. <li></li>
  52. </ul>
  53. </div>
  54. </div>
  55. </header>
  56. <div class="container body-content">
  57. <div id="search-results">
  58. <div class="search-list"></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination"></ul>
  63. </div>
  64. </div>
  65. <div role="main" class="container body-content hide-when-search">
  66. <div class="sidenav hide-when-search">
  67. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  68. <div class="sidetoggle collapse" id="sidetoggle">
  69. <div id="sidetoc"></div>
  70. </div>
  71. </div>
  72. <div class="article row grid-right">
  73. <div class="col-md-10">
  74. <article class="content wrap" id="_content" data-uid="IPA.Utilities.PropertyAccessor`2">
  75. <h1 id="IPA_Utilities_PropertyAccessor_2" data-uid="IPA.Utilities.PropertyAccessor`2" class="text-break">Class PropertyAccessor&lt;T, U&gt;
  76. </h1>
  77. <div class="markdown level0 summary"><p>A type containing utilities for accessing non-public properties of an object.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><span class="xref">PropertyAccessor&lt;T, U&gt;</span></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  89. </div>
  90. <div>
  91. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  92. </div>
  93. <div>
  94. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_System_Object_">Object.Equals(Object, Object)</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#System_Object_ReferenceEquals_System_Object_System_Object_">Object.ReferenceEquals(Object, Object)</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  104. </div>
  105. <div>
  106. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  107. </div>
  108. </div>
  109. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.html">IPA.Utilities</a></h6>
  110. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  111. <h5 id="IPA_Utilities_PropertyAccessor_2_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public static class PropertyAccessor&lt;T, U&gt;</code></pre>
  114. </div>
  115. <h5 class="typeParameters">Type Parameters</h5>
  116. <table class="table table-bordered table-striped table-condensed">
  117. <thead>
  118. <tr>
  119. <th>Name</th>
  120. <th>Description</th>
  121. </tr>
  122. </thead>
  123. <tbody>
  124. <tr>
  125. <td><span class="parametername">T</span></td>
  126. <td><p>the type that the properties are on</p>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td><span class="parametername">U</span></td>
  131. <td><p>the type of the property to access</p>
  132. </td>
  133. </tr>
  134. </tbody>
  135. </table>
  136. <h3 id="methods">Methods
  137. </h3>
  138. <span class="small pull-right mobile-hide">
  139. <span class="divider">|</span>
  140. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_Get__0_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.Get(%600%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  141. </span>
  142. <span class="small pull-right mobile-hide">
  143. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L249">View Source</a>
  144. </span>
  145. <a id="IPA_Utilities_PropertyAccessor_2_Get_" data-uid="IPA.Utilities.PropertyAccessor`2.Get*"></a>
  146. <h4 id="IPA_Utilities_PropertyAccessor_2_Get__0_System_String_" data-uid="IPA.Utilities.PropertyAccessor`2.Get(`0,System.String)">Get(T, String)</h4>
  147. <div class="markdown level1 summary"><p>Gets the value of the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code> on <code data-dev-comment-type="paramref" class="paramref">obj</code>.</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 static U Get(T obj, string name)</code></pre>
  153. </div>
  154. <h5 class="parameters">Parameters</h5>
  155. <table class="table table-bordered table-striped table-condensed">
  156. <thead>
  157. <tr>
  158. <th>Type</th>
  159. <th>Name</th>
  160. <th>Description</th>
  161. </tr>
  162. </thead>
  163. <tbody>
  164. <tr>
  165. <td><span class="xref">T</span></td>
  166. <td><span class="parametername">obj</span></td>
  167. <td><p>the instance to access</p>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  172. <td><span class="parametername">name</span></td>
  173. <td><p>the name of the property</p>
  174. </td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. <h5 class="returns">Returns</h5>
  179. <table class="table table-bordered table-striped table-condensed">
  180. <thead>
  181. <tr>
  182. <th>Type</th>
  183. <th>Description</th>
  184. </tr>
  185. </thead>
  186. <tbody>
  187. <tr>
  188. <td><span class="xref">U</span></td>
  189. <td><p>the value of the property</p>
  190. </td>
  191. </tr>
  192. </tbody>
  193. </table>
  194. <h5 class="exceptions">Exceptions</h5>
  195. <table class="table table-bordered table-striped table-condensed">
  196. <thead>
  197. <tr>
  198. <th>Type</th>
  199. <th>Condition</th>
  200. </tr>
  201. </thead>
  202. <tbody>
  203. <tr>
  204. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  205. <td><p>if the property does not exist</p>
  206. </td>
  207. </tr>
  208. </tbody>
  209. </table>
  210. <h5 id="IPA_Utilities_PropertyAccessor_2_Get__0_System_String__seealso">See Also</h5>
  211. <div class="seealso">
  212. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Get__0__System_String_">Get(ref T, String)</a></div>
  213. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_GetGetter_System_String_">GetGetter(String)</a></div>
  214. </div>
  215. <span class="small pull-right mobile-hide">
  216. <span class="divider">|</span>
  217. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_Get__0__System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.Get(%600%40%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  218. </span>
  219. <span class="small pull-right mobile-hide">
  220. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L239">View Source</a>
  221. </span>
  222. <a id="IPA_Utilities_PropertyAccessor_2_Get_" data-uid="IPA.Utilities.PropertyAccessor`2.Get*"></a>
  223. <h4 id="IPA_Utilities_PropertyAccessor_2_Get__0__System_String_" data-uid="IPA.Utilities.PropertyAccessor`2.Get(`0@,System.String)">Get(ref T, String)</h4>
  224. <div class="markdown level1 summary"><p>Gets the value of the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code> on <code data-dev-comment-type="paramref" class="paramref">obj</code>.</p>
  225. </div>
  226. <div class="markdown level1 conceptual"></div>
  227. <h5 class="decalaration">Declaration</h5>
  228. <div class="codewrapper">
  229. <pre><code class="lang-csharp hljs">public static U Get(ref T obj, string name)</code></pre>
  230. </div>
  231. <h5 class="parameters">Parameters</h5>
  232. <table class="table table-bordered table-striped table-condensed">
  233. <thead>
  234. <tr>
  235. <th>Type</th>
  236. <th>Name</th>
  237. <th>Description</th>
  238. </tr>
  239. </thead>
  240. <tbody>
  241. <tr>
  242. <td><span class="xref">T</span></td>
  243. <td><span class="parametername">obj</span></td>
  244. <td><p>the instance to access</p>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  249. <td><span class="parametername">name</span></td>
  250. <td><p>the name of the property</p>
  251. </td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. <h5 class="returns">Returns</h5>
  256. <table class="table table-bordered table-striped table-condensed">
  257. <thead>
  258. <tr>
  259. <th>Type</th>
  260. <th>Description</th>
  261. </tr>
  262. </thead>
  263. <tbody>
  264. <tr>
  265. <td><span class="xref">U</span></td>
  266. <td><p>the value of the property</p>
  267. </td>
  268. </tr>
  269. </tbody>
  270. </table>
  271. <h5 id="IPA_Utilities_PropertyAccessor_2_Get__0__System_String__remarks">Remarks</h5>
  272. <div class="markdown level1 remarks"><p>The only reason to use this over <a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Get__0_System_String_">Get(T, String)</a> is if you are using a value type because
  273. it avoids a copy.</p>
  274. </div>
  275. <h5 class="exceptions">Exceptions</h5>
  276. <table class="table table-bordered table-striped table-condensed">
  277. <thead>
  278. <tr>
  279. <th>Type</th>
  280. <th>Condition</th>
  281. </tr>
  282. </thead>
  283. <tbody>
  284. <tr>
  285. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  286. <td><p>if the property does not exist</p>
  287. </td>
  288. </tr>
  289. </tbody>
  290. </table>
  291. <h5 id="IPA_Utilities_PropertyAccessor_2_Get__0__System_String__seealso">See Also</h5>
  292. <div class="seealso">
  293. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Get__0_System_String_">Get(T, String)</a></div>
  294. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_GetGetter_System_String_">GetGetter(String)</a></div>
  295. </div>
  296. <span class="small pull-right mobile-hide">
  297. <span class="divider">|</span>
  298. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_GetGetter_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.GetGetter(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  299. </span>
  300. <span class="small pull-right mobile-hide">
  301. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L217">View Source</a>
  302. </span>
  303. <a id="IPA_Utilities_PropertyAccessor_2_GetGetter_" data-uid="IPA.Utilities.PropertyAccessor`2.GetGetter*"></a>
  304. <h4 id="IPA_Utilities_PropertyAccessor_2_GetGetter_System_String_" data-uid="IPA.Utilities.PropertyAccessor`2.GetGetter(System.String)">GetGetter(String)</h4>
  305. <div class="markdown level1 summary"><p>Gets a <a class="xref" href="IPA.Utilities.PropertyAccessor-2.Getter.html">PropertyAccessor&lt;T, U&gt;.Getter</a> for the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code>.</p>
  306. </div>
  307. <div class="markdown level1 conceptual"></div>
  308. <h5 class="decalaration">Declaration</h5>
  309. <div class="codewrapper">
  310. <pre><code class="lang-csharp hljs">public static PropertyAccessor&lt;T, U&gt;.Getter GetGetter(string name)</code></pre>
  311. </div>
  312. <h5 class="parameters">Parameters</h5>
  313. <table class="table table-bordered table-striped table-condensed">
  314. <thead>
  315. <tr>
  316. <th>Type</th>
  317. <th>Name</th>
  318. <th>Description</th>
  319. </tr>
  320. </thead>
  321. <tbody>
  322. <tr>
  323. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  324. <td><span class="parametername">name</span></td>
  325. <td><p>the name of the property</p>
  326. </td>
  327. </tr>
  328. </tbody>
  329. </table>
  330. <h5 class="returns">Returns</h5>
  331. <table class="table table-bordered table-striped table-condensed">
  332. <thead>
  333. <tr>
  334. <th>Type</th>
  335. <th>Description</th>
  336. </tr>
  337. </thead>
  338. <tbody>
  339. <tr>
  340. <td><a class="xref" href="IPA.Utilities.PropertyAccessor-2.Getter.html">PropertyAccessor.Getter</a>&lt;&gt;</td>
  341. <td><p>a <a class="xref" href="IPA.Utilities.PropertyAccessor-2.Getter.html">PropertyAccessor&lt;T, U&gt;.Getter</a> that can access that property</p>
  342. </td>
  343. </tr>
  344. </tbody>
  345. </table>
  346. <h5 class="exceptions">Exceptions</h5>
  347. <table class="table table-bordered table-striped table-condensed">
  348. <thead>
  349. <tr>
  350. <th>Type</th>
  351. <th>Condition</th>
  352. </tr>
  353. </thead>
  354. <tbody>
  355. <tr>
  356. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  357. <td><p>if the property does not exist</p>
  358. </td>
  359. </tr>
  360. </tbody>
  361. </table>
  362. <span class="small pull-right mobile-hide">
  363. <span class="divider">|</span>
  364. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_GetSetter_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.GetSetter(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  365. </span>
  366. <span class="small pull-right mobile-hide">
  367. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L224">View Source</a>
  368. </span>
  369. <a id="IPA_Utilities_PropertyAccessor_2_GetSetter_" data-uid="IPA.Utilities.PropertyAccessor`2.GetSetter*"></a>
  370. <h4 id="IPA_Utilities_PropertyAccessor_2_GetSetter_System_String_" data-uid="IPA.Utilities.PropertyAccessor`2.GetSetter(System.String)">GetSetter(String)</h4>
  371. <div class="markdown level1 summary"><p>Gets a <a class="xref" href="IPA.Utilities.PropertyAccessor-2.Setter.html">PropertyAccessor&lt;T, U&gt;.Setter</a> for the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code>.</p>
  372. </div>
  373. <div class="markdown level1 conceptual"></div>
  374. <h5 class="decalaration">Declaration</h5>
  375. <div class="codewrapper">
  376. <pre><code class="lang-csharp hljs">public static PropertyAccessor&lt;T, U&gt;.Setter GetSetter(string name)</code></pre>
  377. </div>
  378. <h5 class="parameters">Parameters</h5>
  379. <table class="table table-bordered table-striped table-condensed">
  380. <thead>
  381. <tr>
  382. <th>Type</th>
  383. <th>Name</th>
  384. <th>Description</th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. <tr>
  389. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  390. <td><span class="parametername">name</span></td>
  391. <td><p>the name of the property</p>
  392. </td>
  393. </tr>
  394. </tbody>
  395. </table>
  396. <h5 class="returns">Returns</h5>
  397. <table class="table table-bordered table-striped table-condensed">
  398. <thead>
  399. <tr>
  400. <th>Type</th>
  401. <th>Description</th>
  402. </tr>
  403. </thead>
  404. <tbody>
  405. <tr>
  406. <td><a class="xref" href="IPA.Utilities.PropertyAccessor-2.Setter.html">PropertyAccessor.Setter</a>&lt;&gt;</td>
  407. <td><p>a <a class="xref" href="IPA.Utilities.PropertyAccessor-2.Setter.html">PropertyAccessor&lt;T, U&gt;.Setter</a> that can access that property</p>
  408. </td>
  409. </tr>
  410. </tbody>
  411. </table>
  412. <h5 class="exceptions">Exceptions</h5>
  413. <table class="table table-bordered table-striped table-condensed">
  414. <thead>
  415. <tr>
  416. <th>Type</th>
  417. <th>Condition</th>
  418. </tr>
  419. </thead>
  420. <tbody>
  421. <tr>
  422. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  423. <td><p>if the property does not exist</p>
  424. </td>
  425. </tr>
  426. </tbody>
  427. </table>
  428. <span class="small pull-right mobile-hide">
  429. <span class="divider">|</span>
  430. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_Set__0_System_String__1_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.Set(%600%2CSystem.String%2C%601)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  431. </span>
  432. <span class="small pull-right mobile-hide">
  433. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L275">View Source</a>
  434. </span>
  435. <a id="IPA_Utilities_PropertyAccessor_2_Set_" data-uid="IPA.Utilities.PropertyAccessor`2.Set*"></a>
  436. <h4 id="IPA_Utilities_PropertyAccessor_2_Set__0_System_String__1_" data-uid="IPA.Utilities.PropertyAccessor`2.Set(`0,System.String,`1)">Set(T, String, U)</h4>
  437. <div class="markdown level1 summary"><p>Sets the value of the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code> on <code data-dev-comment-type="paramref" class="paramref">obj</code>.</p>
  438. </div>
  439. <div class="markdown level1 conceptual"></div>
  440. <h5 class="decalaration">Declaration</h5>
  441. <div class="codewrapper">
  442. <pre><code class="lang-csharp hljs">public static void Set(T obj, string name, U val)</code></pre>
  443. </div>
  444. <h5 class="parameters">Parameters</h5>
  445. <table class="table table-bordered table-striped table-condensed">
  446. <thead>
  447. <tr>
  448. <th>Type</th>
  449. <th>Name</th>
  450. <th>Description</th>
  451. </tr>
  452. </thead>
  453. <tbody>
  454. <tr>
  455. <td><span class="xref">T</span></td>
  456. <td><span class="parametername">obj</span></td>
  457. <td><p>the instance to access</p>
  458. </td>
  459. </tr>
  460. <tr>
  461. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  462. <td><span class="parametername">name</span></td>
  463. <td><p>the name of the property</p>
  464. </td>
  465. </tr>
  466. <tr>
  467. <td><span class="xref">U</span></td>
  468. <td><span class="parametername">val</span></td>
  469. <td><p>the new value of the property</p>
  470. </td>
  471. </tr>
  472. </tbody>
  473. </table>
  474. <h5 id="IPA_Utilities_PropertyAccessor_2_Set__0_System_String__1__remarks">Remarks</h5>
  475. <div class="markdown level1 remarks"><p>This overload cannot be safely used for value types. Use <a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1_">Set(ref T, String, U)</a> instead.</p>
  476. </div>
  477. <h5 class="exceptions">Exceptions</h5>
  478. <table class="table table-bordered table-striped table-condensed">
  479. <thead>
  480. <tr>
  481. <th>Type</th>
  482. <th>Condition</th>
  483. </tr>
  484. </thead>
  485. <tbody>
  486. <tr>
  487. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  488. <td><p>if the property does not exist</p>
  489. </td>
  490. </tr>
  491. </tbody>
  492. </table>
  493. <h5 id="IPA_Utilities_PropertyAccessor_2_Set__0_System_String__1__seealso">See Also</h5>
  494. <div class="seealso">
  495. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1_">Set(ref T, String, U)</a></div>
  496. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_GetSetter_System_String_">GetSetter(String)</a></div>
  497. </div>
  498. <span class="small pull-right mobile-hide">
  499. <span class="divider">|</span>
  500. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1_.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602.Set(%600%40%2CSystem.String%2C%601)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  501. </span>
  502. <span class="small pull-right mobile-hide">
  503. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L262">View Source</a>
  504. </span>
  505. <a id="IPA_Utilities_PropertyAccessor_2_Set_" data-uid="IPA.Utilities.PropertyAccessor`2.Set*"></a>
  506. <h4 id="IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1_" data-uid="IPA.Utilities.PropertyAccessor`2.Set(`0@,System.String,`1)">Set(ref T, String, U)</h4>
  507. <div class="markdown level1 summary"><p>Sets the value of the property identified by <code data-dev-comment-type="paramref" class="paramref">name</code> on <code data-dev-comment-type="paramref" class="paramref">obj</code>.</p>
  508. </div>
  509. <div class="markdown level1 conceptual"></div>
  510. <h5 class="decalaration">Declaration</h5>
  511. <div class="codewrapper">
  512. <pre><code class="lang-csharp hljs">public static void Set(ref T obj, string name, U val)</code></pre>
  513. </div>
  514. <h5 class="parameters">Parameters</h5>
  515. <table class="table table-bordered table-striped table-condensed">
  516. <thead>
  517. <tr>
  518. <th>Type</th>
  519. <th>Name</th>
  520. <th>Description</th>
  521. </tr>
  522. </thead>
  523. <tbody>
  524. <tr>
  525. <td><span class="xref">T</span></td>
  526. <td><span class="parametername">obj</span></td>
  527. <td><p>the instance to access</p>
  528. </td>
  529. </tr>
  530. <tr>
  531. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  532. <td><span class="parametername">name</span></td>
  533. <td><p>the name of the property</p>
  534. </td>
  535. </tr>
  536. <tr>
  537. <td><span class="xref">U</span></td>
  538. <td><span class="parametername">val</span></td>
  539. <td><p>the new value of the property</p>
  540. </td>
  541. </tr>
  542. </tbody>
  543. </table>
  544. <h5 id="IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1__remarks">Remarks</h5>
  545. <div class="markdown level1 remarks"><p>This overload must be used for value types.</p>
  546. </div>
  547. <h5 class="exceptions">Exceptions</h5>
  548. <table class="table table-bordered table-striped table-condensed">
  549. <thead>
  550. <tr>
  551. <th>Type</th>
  552. <th>Condition</th>
  553. </tr>
  554. </thead>
  555. <tbody>
  556. <tr>
  557. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.missingmemberexception">MissingMemberException</a></td>
  558. <td><p>if the property does not exist</p>
  559. </td>
  560. </tr>
  561. </tbody>
  562. </table>
  563. <h5 id="IPA_Utilities_PropertyAccessor_2_Set__0__System_String__1__seealso">See Also</h5>
  564. <div class="seealso">
  565. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_Set__0_System_String__1_">Set(T, String, U)</a></div>
  566. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html#IPA_Utilities_PropertyAccessor_2_GetSetter_System_String_">GetSetter(String)</a></div>
  567. </div>
  568. </article>
  569. </div>
  570. <div class="hidden-sm col-md-2" role="complementary">
  571. <div class="sideaffix">
  572. <div class="contribution">
  573. <ul class="nav">
  574. <li>
  575. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_PropertyAccessor_2.md&amp;value=---%0Auid%3A%20IPA.Utilities.PropertyAccessor%602%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  576. </li>
  577. <li>
  578. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/ea7c533afed6ec09e4552f30fb5791a440c0420c/IPA.Loader/Utilities/Accessor.cs/#L137" class="contribution-link">View Source</a>
  579. </li>
  580. </ul>
  581. </div>
  582. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  583. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  584. </nav>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. <footer>
  590. <div class="grad-bottom"></div>
  591. <div class="footer">
  592. <div class="container">
  593. <span class="pull-right">
  594. <a href="#top">Back to top</a>
  595. </span>
  596. <span>Generated by <strong>DocFX</strong></span>
  597. </div>
  598. </div>
  599. </footer>
  600. </div>
  601. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  602. <script type="text/javascript" src="../styles/docfx.js"></script>
  603. <script type="text/javascript" src="../styles/main.js"></script>
  604. </body>
  605. </html>