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.

559 lines
30 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 Feature
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Feature
  11. ">
  12. <meta name="generator" content="docfx 2.44.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 href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. <meta property="docfx:rel" content="../">
  21. <meta property="docfx:newtab" content="true">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../index.html">
  35. <img id="logo" class="svg" src="../logo.svg" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list"></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="IPA.Loader.Features.Feature">
  74. <h1 id="IPA_Loader_Features_Feature" data-uid="IPA.Loader.Features.Feature" class="text-break">Class Feature
  75. </h1>
  76. <div class="markdown level0 summary"><p>The root interface for a mod Feature.</p>
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  82. <div class="level1"><span class="xref">Feature</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  88. </div>
  89. <div>
  90. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  91. </div>
  92. <div>
  93. <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>
  94. </div>
  95. <div>
  96. <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>
  97. </div>
  98. <div>
  99. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  106. </div>
  107. </div>
  108. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Loader.Features.html">IPA.Loader.Features</a></h6>
  109. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  110. <h5 id="IPA_Loader_Features_Feature_syntax">Syntax</h5>
  111. <div class="codewrapper">
  112. <pre><code class="lang-csharp hljs">public abstract class Feature</code></pre>
  113. </div>
  114. <h5 id="IPA_Loader_Features_Feature_remarks"><strong>Remarks</strong></h5>
  115. <div class="markdown level0 remarks"><p>Avoid storing any data in any subclasses. If you do, it may result in a failure to load the feature.</p>
  116. </div>
  117. <h3 id="properties">Properties
  118. </h3>
  119. <span class="small pull-right mobile-hide">
  120. <span class="divider">|</span>
  121. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_InvalidMessage.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.InvalidMessage%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>
  122. </span>
  123. <span class="small pull-right mobile-hide">
  124. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L46">View Source</a>
  125. </span>
  126. <a id="IPA_Loader_Features_Feature_InvalidMessage_" data-uid="IPA.Loader.Features.Feature.InvalidMessage*"></a>
  127. <h4 id="IPA_Loader_Features_Feature_InvalidMessage" data-uid="IPA.Loader.Features.Feature.InvalidMessage">InvalidMessage</h4>
  128. <div class="markdown level1 summary"><p>The message to be logged when the feature is not valid for a plugin.
  129. This should also be set whenever either <a class="xref" href="IPA.Loader.Features.Feature.html#IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginLoader_PluginMetadata_">BeforeLoad(PluginLoader.PluginMetadata)</a> or <a class="xref" href="IPA.Loader.Features.Feature.html#IPA_Loader_Features_Feature_BeforeInit_IPA_Loader_PluginLoader_PluginInfo_">BeforeInit(PluginLoader.PluginInfo)</a> returns false.</p>
  130. </div>
  131. <div class="markdown level1 conceptual"></div>
  132. <h5 class="decalaration">Declaration</h5>
  133. <div class="codewrapper">
  134. <pre><code class="lang-csharp hljs">public virtual string InvalidMessage { get; protected set; }</code></pre>
  135. </div>
  136. <h5 class="propertyValue">Property Value</h5>
  137. <table class="table table-bordered table-striped table-condensed">
  138. <thead>
  139. <tr>
  140. <th>Type</th>
  141. <th>Description</th>
  142. </tr>
  143. </thead>
  144. <tbody>
  145. <tr>
  146. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  147. <td><p>the message to show when the feature is marked invalid</p>
  148. </td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <span class="small pull-right mobile-hide">
  153. <span class="divider">|</span>
  154. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_StoreOnPlugin.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.StoreOnPlugin%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>
  155. </span>
  156. <span class="small pull-right mobile-hide">
  157. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L89">View Source</a>
  158. </span>
  159. <a id="IPA_Loader_Features_Feature_StoreOnPlugin_" data-uid="IPA.Loader.Features.Feature.StoreOnPlugin*"></a>
  160. <h4 id="IPA_Loader_Features_Feature_StoreOnPlugin" data-uid="IPA.Loader.Features.Feature.StoreOnPlugin">StoreOnPlugin</h4>
  161. <div class="markdown level1 summary"><p>Defines whether or not this feature will be accessible from the plugin metadata once loaded.</p>
  162. </div>
  163. <div class="markdown level1 conceptual"></div>
  164. <h5 class="decalaration">Declaration</h5>
  165. <div class="codewrapper">
  166. <pre><code class="lang-csharp hljs">protected virtual bool StoreOnPlugin { get; }</code></pre>
  167. </div>
  168. <h5 class="propertyValue">Property Value</h5>
  169. <table class="table table-bordered table-striped table-condensed">
  170. <thead>
  171. <tr>
  172. <th>Type</th>
  173. <th>Description</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. <tr>
  178. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  179. <td><p><span class="xref">true</span> if this <a class="xref" href="IPA.Loader.Features.Feature.html">Feature</a> will be stored on the plugin metadata, <span class="xref">false</span> otherwise</p>
  180. </td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <h3 id="methods">Methods
  185. </h3>
  186. <span class="small pull-right mobile-hide">
  187. <span class="divider">|</span>
  188. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginLoader_PluginInfo_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginLoader.PluginInfo)%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>
  189. </span>
  190. <span class="small pull-right mobile-hide">
  191. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L77">View Source</a>
  192. </span>
  193. <a id="IPA_Loader_Features_Feature_AfterInit_" data-uid="IPA.Loader.Features.Feature.AfterInit*"></a>
  194. <h4 id="IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginLoader_PluginInfo_" data-uid="IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginLoader.PluginInfo)">AfterInit(PluginLoader.PluginInfo)</h4>
  195. <div class="markdown level1 summary"><p>Called after a plugin has been fully initialized, whether or not there is an <code>Init</code> method. This should never throw an exception.</p>
  196. </div>
  197. <div class="markdown level1 conceptual"></div>
  198. <h5 class="decalaration">Declaration</h5>
  199. <div class="codewrapper">
  200. <pre><code class="lang-csharp hljs">public virtual void AfterInit(PluginLoader.PluginInfo plugin)</code></pre>
  201. </div>
  202. <h5 class="parameters">Parameters</h5>
  203. <table class="table table-bordered table-striped table-condensed">
  204. <thead>
  205. <tr>
  206. <th>Type</th>
  207. <th>Name</th>
  208. <th>Description</th>
  209. </tr>
  210. </thead>
  211. <tbody>
  212. <tr>
  213. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginInfo.html">PluginLoader.PluginInfo</a></td>
  214. <td><span class="parametername">plugin</span></td>
  215. <td><p>the plugin that was just initialized</p>
  216. </td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. <span class="small pull-right mobile-hide">
  221. <span class="divider">|</span>
  222. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginLoader_PluginInfo_IPA_IBeatSaberPlugin_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginLoader.PluginInfo%2CIPA.IBeatSaberPlugin)%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>
  223. </span>
  224. <span class="small pull-right mobile-hide">
  225. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L71">View Source</a>
  226. </span>
  227. <a id="IPA_Loader_Features_Feature_AfterInit_" data-uid="IPA.Loader.Features.Feature.AfterInit*"></a>
  228. <h4 id="IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginLoader_PluginInfo_IPA_IBeatSaberPlugin_" data-uid="IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginLoader.PluginInfo,IPA.IBeatSaberPlugin)">AfterInit(PluginLoader.PluginInfo, IBeatSaberPlugin)</h4>
  229. <div class="markdown level1 summary"><p>Called after a plugin has been fully initialized, whether or not there is an <code>Init</code> method. This should never throw an exception.</p>
  230. </div>
  231. <div class="markdown level1 conceptual"></div>
  232. <h5 class="decalaration">Declaration</h5>
  233. <div class="codewrapper">
  234. <pre><code class="lang-csharp hljs">public virtual void AfterInit(PluginLoader.PluginInfo plugin, IBeatSaberPlugin pluginInstance)</code></pre>
  235. </div>
  236. <h5 class="parameters">Parameters</h5>
  237. <table class="table table-bordered table-striped table-condensed">
  238. <thead>
  239. <tr>
  240. <th>Type</th>
  241. <th>Name</th>
  242. <th>Description</th>
  243. </tr>
  244. </thead>
  245. <tbody>
  246. <tr>
  247. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginInfo.html">PluginLoader.PluginInfo</a></td>
  248. <td><span class="parametername">plugin</span></td>
  249. <td><p>the plugin that was just initialized</p>
  250. </td>
  251. </tr>
  252. <tr>
  253. <td><a class="xref" href="IPA.IBeatSaberPlugin.html">IBeatSaberPlugin</a></td>
  254. <td><span class="parametername">pluginInstance</span></td>
  255. <td><p>the instance of the plugin being initialized</p>
  256. </td>
  257. </tr>
  258. </tbody>
  259. </table>
  260. <span class="small pull-right mobile-hide">
  261. <span class="divider">|</span>
  262. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_BeforeInit_IPA_Loader_PluginLoader_PluginInfo_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.BeforeInit(IPA.Loader.PluginLoader.PluginInfo)%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>
  263. </span>
  264. <span class="small pull-right mobile-hide">
  265. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L64">View Source</a>
  266. </span>
  267. <a id="IPA_Loader_Features_Feature_BeforeInit_" data-uid="IPA.Loader.Features.Feature.BeforeInit*"></a>
  268. <h4 id="IPA_Loader_Features_Feature_BeforeInit_IPA_Loader_PluginLoader_PluginInfo_" data-uid="IPA.Loader.Features.Feature.BeforeInit(IPA.Loader.PluginLoader.PluginInfo)">BeforeInit(PluginLoader.PluginInfo)</h4>
  269. <div class="markdown level1 summary"><p>Called before a plugin&apos;s <code>Init</code> method is called. This will not be called if there is no <code>Init</code> method. This should never throw an exception. An exception will abort the loading of the plugin with an error.</p>
  270. </div>
  271. <div class="markdown level1 conceptual"></div>
  272. <h5 class="decalaration">Declaration</h5>
  273. <div class="codewrapper">
  274. <pre><code class="lang-csharp hljs">public virtual bool BeforeInit(PluginLoader.PluginInfo plugin)</code></pre>
  275. </div>
  276. <h5 class="parameters">Parameters</h5>
  277. <table class="table table-bordered table-striped table-condensed">
  278. <thead>
  279. <tr>
  280. <th>Type</th>
  281. <th>Name</th>
  282. <th>Description</th>
  283. </tr>
  284. </thead>
  285. <tbody>
  286. <tr>
  287. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginInfo.html">PluginLoader.PluginInfo</a></td>
  288. <td><span class="parametername">plugin</span></td>
  289. <td><p>the plugin to be initialized</p>
  290. </td>
  291. </tr>
  292. </tbody>
  293. </table>
  294. <h5 class="returns">Returns</h5>
  295. <table class="table table-bordered table-striped table-condensed">
  296. <thead>
  297. <tr>
  298. <th>Type</th>
  299. <th>Description</th>
  300. </tr>
  301. </thead>
  302. <tbody>
  303. <tr>
  304. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  305. <td><p>whether or not to call the Init method</p>
  306. </td>
  307. </tr>
  308. </tbody>
  309. </table>
  310. <span class="small pull-right mobile-hide">
  311. <span class="divider">|</span>
  312. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginLoader_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.BeforeLoad(IPA.Loader.PluginLoader.PluginMetadata)%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>
  313. </span>
  314. <span class="small pull-right mobile-hide">
  315. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L57">View Source</a>
  316. </span>
  317. <a id="IPA_Loader_Features_Feature_BeforeLoad_" data-uid="IPA.Loader.Features.Feature.BeforeLoad*"></a>
  318. <h4 id="IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginLoader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.BeforeLoad(IPA.Loader.PluginLoader.PluginMetadata)">BeforeLoad(PluginLoader.PluginMetadata)</h4>
  319. <div class="markdown level1 summary"><p>Called before a plugin is loaded. This should never throw an exception. An exception will abort the loading of the plugin with an error.</p>
  320. </div>
  321. <div class="markdown level1 conceptual"></div>
  322. <h5 class="decalaration">Declaration</h5>
  323. <div class="codewrapper">
  324. <pre><code class="lang-csharp hljs">public virtual bool BeforeLoad(PluginLoader.PluginMetadata plugin)</code></pre>
  325. </div>
  326. <h5 class="parameters">Parameters</h5>
  327. <table class="table table-bordered table-striped table-condensed">
  328. <thead>
  329. <tr>
  330. <th>Type</th>
  331. <th>Name</th>
  332. <th>Description</th>
  333. </tr>
  334. </thead>
  335. <tbody>
  336. <tr>
  337. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginMetadata.html">PluginLoader.PluginMetadata</a></td>
  338. <td><span class="parametername">plugin</span></td>
  339. <td><p>the plugin about to be loaded</p>
  340. </td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. <h5 class="returns">Returns</h5>
  345. <table class="table table-bordered table-striped table-condensed">
  346. <thead>
  347. <tr>
  348. <th>Type</th>
  349. <th>Description</th>
  350. </tr>
  351. </thead>
  352. <tbody>
  353. <tr>
  354. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  355. <td><p>whether or not the plugin should be loaded</p>
  356. </td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. <h5 id="IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginLoader_PluginMetadata__remarks">Remarks</h5>
  361. <div class="markdown level1 remarks"><p>The assembly will still be loaded, but the plugin will not be constructed if this returns <span class="xref">false</span>.
  362. Any features it defines, for example, will still be loaded.</p>
  363. </div>
  364. <span class="small pull-right mobile-hide">
  365. <span class="divider">|</span>
  366. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_Evaluate.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.Evaluate%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>
  367. </span>
  368. <span class="small pull-right mobile-hide">
  369. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L39">View Source</a>
  370. </span>
  371. <a id="IPA_Loader_Features_Feature_Evaluate_" data-uid="IPA.Loader.Features.Feature.Evaluate*"></a>
  372. <h4 id="IPA_Loader_Features_Feature_Evaluate" data-uid="IPA.Loader.Features.Feature.Evaluate">Evaluate()</h4>
  373. <div class="markdown level1 summary"><p>Evaluates the Feature for use in conditional meta-Features. This should be re-calculated on every call, unless it can be proven to not change.</p>
  374. <p>This will be called on every feature that returns <span class="xref">true</span> from <a class="xref" href="IPA.Loader.Features.Feature.html#IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginLoader_PluginMetadata_System_String___">Initialize(PluginLoader.PluginMetadata, String[])</a></p>
  375. </div>
  376. <div class="markdown level1 conceptual"></div>
  377. <h5 class="decalaration">Declaration</h5>
  378. <div class="codewrapper">
  379. <pre><code class="lang-csharp hljs">public virtual bool Evaluate()</code></pre>
  380. </div>
  381. <h5 class="returns">Returns</h5>
  382. <table class="table table-bordered table-striped table-condensed">
  383. <thead>
  384. <tr>
  385. <th>Type</th>
  386. <th>Description</th>
  387. </tr>
  388. </thead>
  389. <tbody>
  390. <tr>
  391. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  392. <td><p>the truthiness of the Feature.</p>
  393. </td>
  394. </tr>
  395. </tbody>
  396. </table>
  397. <span class="small pull-right mobile-hide">
  398. <span class="divider">|</span>
  399. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginLoader_PluginMetadata_System_String___.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.Initialize(IPA.Loader.PluginLoader.PluginMetadata%2CSystem.String%5B%5D)%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>
  400. </span>
  401. <span class="small pull-right mobile-hide">
  402. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L31">View Source</a>
  403. </span>
  404. <a id="IPA_Loader_Features_Feature_Initialize_" data-uid="IPA.Loader.Features.Feature.Initialize*"></a>
  405. <h4 id="IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginLoader_PluginMetadata_System_String___" data-uid="IPA.Loader.Features.Feature.Initialize(IPA.Loader.PluginLoader.PluginMetadata,System.String[])">Initialize(PluginLoader.PluginMetadata, String[])</h4>
  406. <div class="markdown level1 summary"><p>Initializes the feature with the parameters provided in the definition.</p>
  407. <p>Note: When no parenthesis are provided, <code data-dev-comment-type="paramref" class="paramref">parameters</code> is an empty array.</p>
  408. </div>
  409. <div class="markdown level1 conceptual"></div>
  410. <h5 class="decalaration">Declaration</h5>
  411. <div class="codewrapper">
  412. <pre><code class="lang-csharp hljs">public abstract bool Initialize(PluginLoader.PluginMetadata meta, string[] parameters)</code></pre>
  413. </div>
  414. <h5 class="parameters">Parameters</h5>
  415. <table class="table table-bordered table-striped table-condensed">
  416. <thead>
  417. <tr>
  418. <th>Type</th>
  419. <th>Name</th>
  420. <th>Description</th>
  421. </tr>
  422. </thead>
  423. <tbody>
  424. <tr>
  425. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginMetadata.html">PluginLoader.PluginMetadata</a></td>
  426. <td><span class="parametername">meta</span></td>
  427. <td><p>the metadata of the plugin that is being prepared</p>
  428. </td>
  429. </tr>
  430. <tr>
  431. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a>[]</td>
  432. <td><span class="parametername">parameters</span></td>
  433. <td><p>the parameters passed to the feature definition, or null</p>
  434. </td>
  435. </tr>
  436. </tbody>
  437. </table>
  438. <h5 class="returns">Returns</h5>
  439. <table class="table table-bordered table-striped table-condensed">
  440. <thead>
  441. <tr>
  442. <th>Type</th>
  443. <th>Description</th>
  444. </tr>
  445. </thead>
  446. <tbody>
  447. <tr>
  448. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  449. <td><p><span class="xref">true</span> if the feature is valid for the plugin, <span class="xref">false</span> otherwise</p>
  450. </td>
  451. </tr>
  452. </tbody>
  453. </table>
  454. <h5 id="IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginLoader_PluginMetadata_System_String____remarks">Remarks</h5>
  455. <div class="markdown level1 remarks"><p>This gets called BEFORE <em>your</em> <code>Init</code> method.</p>
  456. <p>Returning <span class="xref">false</span> does <em>not</em> prevent the plugin from being loaded. It simply prevents the feature from being used.</p>
  457. </div>
  458. <span class="small pull-right mobile-hide">
  459. <span class="divider">|</span>
  460. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature_RequireLoaded_IPA_Loader_PluginLoader_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.RequireLoaded(IPA.Loader.PluginLoader.PluginMetadata)%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>
  461. </span>
  462. <span class="small pull-right mobile-hide">
  463. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L83">View Source</a>
  464. </span>
  465. <a id="IPA_Loader_Features_Feature_RequireLoaded_" data-uid="IPA.Loader.Features.Feature.RequireLoaded*"></a>
  466. <h4 id="IPA_Loader_Features_Feature_RequireLoaded_IPA_Loader_PluginLoader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.RequireLoaded(IPA.Loader.PluginLoader.PluginMetadata)">RequireLoaded(PluginLoader.PluginMetadata)</h4>
  467. <div class="markdown level1 summary"><p>Ensures a plugin&apos;s assembly is loaded. Do not use unless you need to.</p>
  468. </div>
  469. <div class="markdown level1 conceptual"></div>
  470. <h5 class="decalaration">Declaration</h5>
  471. <div class="codewrapper">
  472. <pre><code class="lang-csharp hljs">protected void RequireLoaded(PluginLoader.PluginMetadata plugin)</code></pre>
  473. </div>
  474. <h5 class="parameters">Parameters</h5>
  475. <table class="table table-bordered table-striped table-condensed">
  476. <thead>
  477. <tr>
  478. <th>Type</th>
  479. <th>Name</th>
  480. <th>Description</th>
  481. </tr>
  482. </thead>
  483. <tbody>
  484. <tr>
  485. <td><a class="xref" href="IPA.Loader.PluginLoader.PluginMetadata.html">PluginLoader.PluginMetadata</a></td>
  486. <td><span class="parametername">plugin</span></td>
  487. <td><p>the plugin to ensure is loaded.</p>
  488. </td>
  489. </tr>
  490. </tbody>
  491. </table>
  492. <h3 id="extensionmethods">Extension Methods</h3>
  493. <div>
  494. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateField_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateField(Object, String, Object)</a>
  495. </div>
  496. <div>
  497. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetPrivateField__1_System_Object_System_String_">ReflectionUtil.GetPrivateField&lt;T&gt;(Object, String)</a>
  498. </div>
  499. <div>
  500. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateProperty_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateProperty(Object, String, Object)</a>
  501. </div>
  502. <div>
  503. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod(Object, String, Object[])</a>
  504. </div>
  505. <div>
  506. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod__1_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod&lt;T&gt;(Object, String, Object[])</a>
  507. </div>
  508. </article>
  509. </div>
  510. <div class="hidden-sm col-md-2" role="complementary">
  511. <div class="sideaffix">
  512. <div class="contribution">
  513. <ul class="nav">
  514. <li>
  515. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Loader_Features_Feature.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature%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>
  516. </li>
  517. <li>
  518. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/3b4b69eb05c225459f4aba5bdb813db25f50d9cf/IPA.Loader/Loader/Features/Feature.cs/#L16" class="contribution-link">View Source</a>
  519. </li>
  520. </ul>
  521. </div>
  522. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  523. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  524. </nav>
  525. </div>
  526. </div>
  527. </div>
  528. </div>
  529. <footer>
  530. <div class="grad-bottom"></div>
  531. <div class="footer">
  532. <div class="container">
  533. <span class="pull-right">
  534. <a href="#top">Back to top</a>
  535. </span>
  536. <span>Generated by <strong>DocFX</strong></span>
  537. </div>
  538. </div>
  539. </footer>
  540. </div>
  541. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  542. <script type="text/javascript" src="../styles/docfx.js"></script>
  543. <script type="text/javascript" src="../styles/main.js"></script>
  544. </body>
  545. </html>