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.

262 lines
11 KiB

6 months ago
6 months ago
  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 MethodAccessor&lt;T, TDelegate&gt;
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MethodAccessor&lt;T, TDelegate&gt;
  11. ">
  12. <meta name="generator" content="docfx 2.59.4.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">Search Results for <span></span></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></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.MethodAccessor`2">
  75. <h1 id="IPA_Utilities_MethodAccessor_2" data-uid="IPA.Utilities.MethodAccessor`2" class="text-break">Class MethodAccessor&lt;T, TDelegate&gt;
  76. </h1>
  77. <div class="markdown level0 summary"><p>A type containing utilities for calling non-public methods on 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://learn.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><span class="xref">MethodAccessor&lt;T, TDelegate&gt;</span></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring">Object.ToString()</a>
  89. </div>
  90. <div>
  91. <a class="xref" href="https://learn.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://learn.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://learn.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://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode">Object.GetHashCode()</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype">Object.GetType()</a>
  104. </div>
  105. <div>
  106. <a class="xref" href="https://learn.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_MethodAccessor_2_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public static class MethodAccessor&lt;T, TDelegate&gt;
  114. where TDelegate : Delegate</code></pre>
  115. </div>
  116. <h5 class="typeParameters">Type Parameters</h5>
  117. <table class="table table-bordered table-striped table-condensed">
  118. <thead>
  119. <tr>
  120. <th>Name</th>
  121. <th>Description</th>
  122. </tr>
  123. </thead>
  124. <tbody>
  125. <tr>
  126. <td><span class="parametername">T</span></td>
  127. <td><p>the type to find the methods on</p>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td><span class="parametername">TDelegate</span></td>
  132. <td><p>the delegate type to create, and to use as a signature to search for</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. <h3 id="methods">Methods
  138. </h3>
  139. <span class="small pull-right mobile-hide">
  140. <span class="divider">|</span>
  141. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_MethodAccessor_2_GetDelegate_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.MethodAccessor%602.GetDelegate(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>
  142. </span>
  143. <span class="small pull-right mobile-hide">
  144. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Accessor.cs/#L331">View Source</a>
  145. </span>
  146. <a id="IPA_Utilities_MethodAccessor_2_GetDelegate_" data-uid="IPA.Utilities.MethodAccessor`2.GetDelegate*"></a>
  147. <h4 id="IPA_Utilities_MethodAccessor_2_GetDelegate_System_String_" data-uid="IPA.Utilities.MethodAccessor`2.GetDelegate(System.String)">GetDelegate(String)</h4>
  148. <div class="markdown level1 summary"><p>Gets a delegate to the named method with the signature specified by <code data-dev-comment-type="typeparamref" class="typeparamref">TDelegate</code>.</p>
  149. </div>
  150. <div class="markdown level1 conceptual"></div>
  151. <h5 class="decalaration">Declaration</h5>
  152. <div class="codewrapper">
  153. <pre><code class="lang-csharp hljs">public static TDelegate GetDelegate(string name)</code></pre>
  154. </div>
  155. <h5 class="parameters">Parameters</h5>
  156. <table class="table table-bordered table-striped table-condensed">
  157. <thead>
  158. <tr>
  159. <th>Type</th>
  160. <th>Name</th>
  161. <th>Description</th>
  162. </tr>
  163. </thead>
  164. <tbody>
  165. <tr>
  166. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">String</a></td>
  167. <td><span class="parametername">name</span></td>
  168. <td><p>the name of the method to get</p>
  169. </td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. <h5 class="returns">Returns</h5>
  174. <table class="table table-bordered table-striped table-condensed">
  175. <thead>
  176. <tr>
  177. <th>Type</th>
  178. <th>Description</th>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. <tr>
  183. <td><span class="xref">TDelegate</span></td>
  184. <td><p>a delegate that can call the specified method</p>
  185. </td>
  186. </tr>
  187. </tbody>
  188. </table>
  189. <h5 class="exceptions">Exceptions</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Condition</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.missingmethodexception">MissingMethodException</a></td>
  200. <td><p>if <code data-dev-comment-type="paramref" class="paramref">name</code> does not represent the name of a method with the given signature</p>
  201. </td>
  202. </tr>
  203. <tr>
  204. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  205. <td><p>if the method found returns a type incompatable with the return type of <code data-dev-comment-type="typeparamref" class="typeparamref">TDelegate</code></p>
  206. </td>
  207. </tr>
  208. </tbody>
  209. </table>
  210. </article>
  211. </div>
  212. <div class="hidden-sm col-md-2" role="complementary">
  213. <div class="sideaffix">
  214. <div class="contribution">
  215. <ul class="nav">
  216. <li>
  217. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_MethodAccessor_2.md&amp;value=---%0Auid%3A%20IPA.Utilities.MethodAccessor%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>
  218. </li>
  219. <li>
  220. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Accessor.cs/#L286" class="contribution-link">View Source</a>
  221. </li>
  222. </ul>
  223. </div>
  224. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  225. <h5>In This Article</h5>
  226. <div></div>
  227. </nav>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <footer>
  233. <div class="grad-bottom"></div>
  234. <div class="footer">
  235. <div class="container">
  236. <span class="pull-right">
  237. <a href="#top">Back to top</a>
  238. </span>
  239. <span>Generated by <strong>DocFX</strong></span>
  240. </div>
  241. </div>
  242. </footer>
  243. </div>
  244. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  245. <script type="text/javascript" src="../styles/docfx.js"></script>
  246. <script type="text/javascript" src="../styles/main.js"></script>
  247. </body>
  248. </html>