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.

560 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.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.Loader.Features.Feature">
  75. <h1 id="IPA_Loader_Features_Feature" data-uid="IPA.Loader.Features.Feature" class="text-break">Class Feature
  76. </h1>
  77. <div class="markdown level0 summary"><p>The root interface for a mod Feature.</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">Feature</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.Loader.Features.html">IPA.Loader.Features</a></h6>
  110. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  111. <h5 id="IPA_Loader_Features_Feature_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public abstract class Feature</code></pre>
  114. </div>
  115. <h5 id="IPA_Loader_Features_Feature_remarks"><strong>Remarks</strong></h5>
  116. <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>
  117. </div>
  118. <h3 id="properties">Properties
  119. </h3>
  120. <span class="small pull-right mobile-hide">
  121. <span class="divider">|</span>
  122. <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>
  123. </span>
  124. <span class="small pull-right mobile-hide">
  125. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L46">View Source</a>
  126. </span>
  127. <a id="IPA_Loader_Features_Feature_InvalidMessage_" data-uid="IPA.Loader.Features.Feature.InvalidMessage*"></a>
  128. <h4 id="IPA_Loader_Features_Feature_InvalidMessage" data-uid="IPA.Loader.Features.Feature.InvalidMessage">InvalidMessage</h4>
  129. <div class="markdown level1 summary"><p>The message to be logged when the feature is not valid for a plugin.
  130. This should also be set whenever either <a class="xref" href="IPA.Loader.Features.Feature.html#IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginMetadata_">BeforeLoad(PluginMetadata)</a> or <a class="xref" href="IPA.Loader.Features.Feature.html#IPA_Loader_Features_Feature_BeforeInit_IPA_Loader_PluginMetadata_">BeforeInit(PluginMetadata)</a> returns false.</p>
  131. </div>
  132. <div class="markdown level1 conceptual"></div>
  133. <h5 class="decalaration">Declaration</h5>
  134. <div class="codewrapper">
  135. <pre><code class="lang-csharp hljs">public virtual string InvalidMessage { get; protected set; }</code></pre>
  136. </div>
  137. <h5 class="propertyValue">Property Value</h5>
  138. <table class="table table-bordered table-striped table-condensed">
  139. <thead>
  140. <tr>
  141. <th>Type</th>
  142. <th>Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  148. <td><p>the message to show when the feature is marked invalid</p>
  149. </td>
  150. </tr>
  151. </tbody>
  152. </table>
  153. <span class="small pull-right mobile-hide">
  154. <span class="divider">|</span>
  155. <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>
  156. </span>
  157. <span class="small pull-right mobile-hide">
  158. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L89">View Source</a>
  159. </span>
  160. <a id="IPA_Loader_Features_Feature_StoreOnPlugin_" data-uid="IPA.Loader.Features.Feature.StoreOnPlugin*"></a>
  161. <h4 id="IPA_Loader_Features_Feature_StoreOnPlugin" data-uid="IPA.Loader.Features.Feature.StoreOnPlugin">StoreOnPlugin</h4>
  162. <div class="markdown level1 summary"><p>Defines whether or not this feature will be accessible from the plugin metadata once loaded.</p>
  163. </div>
  164. <div class="markdown level1 conceptual"></div>
  165. <h5 class="decalaration">Declaration</h5>
  166. <div class="codewrapper">
  167. <pre><code class="lang-csharp hljs">protected virtual bool StoreOnPlugin { get; }</code></pre>
  168. </div>
  169. <h5 class="propertyValue">Property Value</h5>
  170. <table class="table table-bordered table-striped table-condensed">
  171. <thead>
  172. <tr>
  173. <th>Type</th>
  174. <th>Description</th>
  175. </tr>
  176. </thead>
  177. <tbody>
  178. <tr>
  179. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  180. <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>
  181. </td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. <h3 id="methods">Methods
  186. </h3>
  187. <span class="small pull-right mobile-hide">
  188. <span class="divider">|</span>
  189. <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_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.AfterInit(IPA.Loader.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>
  190. </span>
  191. <span class="small pull-right mobile-hide">
  192. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L77">View Source</a>
  193. </span>
  194. <a id="IPA_Loader_Features_Feature_AfterInit_" data-uid="IPA.Loader.Features.Feature.AfterInit*"></a>
  195. <h4 id="IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginMetadata)">AfterInit(PluginMetadata)</h4>
  196. <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>
  197. </div>
  198. <div class="markdown level1 conceptual"></div>
  199. <h5 class="decalaration">Declaration</h5>
  200. <div class="codewrapper">
  201. <pre><code class="lang-csharp hljs">public virtual void AfterInit(PluginMetadata plugin)</code></pre>
  202. </div>
  203. <h5 class="parameters">Parameters</h5>
  204. <table class="table table-bordered table-striped table-condensed">
  205. <thead>
  206. <tr>
  207. <th>Type</th>
  208. <th>Name</th>
  209. <th>Description</th>
  210. </tr>
  211. </thead>
  212. <tbody>
  213. <tr>
  214. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  215. <td><span class="parametername">plugin</span></td>
  216. <td><p>the plugin that was just initialized</p>
  217. </td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. <span class="small pull-right mobile-hide">
  222. <span class="divider">|</span>
  223. <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_PluginMetadata_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginMetadata%2CSystem.Object)%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>
  224. </span>
  225. <span class="small pull-right mobile-hide">
  226. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L71">View Source</a>
  227. </span>
  228. <a id="IPA_Loader_Features_Feature_AfterInit_" data-uid="IPA.Loader.Features.Feature.AfterInit*"></a>
  229. <h4 id="IPA_Loader_Features_Feature_AfterInit_IPA_Loader_PluginMetadata_System_Object_" data-uid="IPA.Loader.Features.Feature.AfterInit(IPA.Loader.PluginMetadata,System.Object)">AfterInit(PluginMetadata, Object)</h4>
  230. <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>
  231. </div>
  232. <div class="markdown level1 conceptual"></div>
  233. <h5 class="decalaration">Declaration</h5>
  234. <div class="codewrapper">
  235. <pre><code class="lang-csharp hljs">public virtual void AfterInit(PluginMetadata plugin, object pluginInstance)</code></pre>
  236. </div>
  237. <h5 class="parameters">Parameters</h5>
  238. <table class="table table-bordered table-striped table-condensed">
  239. <thead>
  240. <tr>
  241. <th>Type</th>
  242. <th>Name</th>
  243. <th>Description</th>
  244. </tr>
  245. </thead>
  246. <tbody>
  247. <tr>
  248. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  249. <td><span class="parametername">plugin</span></td>
  250. <td><p>the plugin that was just initialized</p>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></td>
  255. <td><span class="parametername">pluginInstance</span></td>
  256. <td><p>the instance of the plugin being initialized</p>
  257. </td>
  258. </tr>
  259. </tbody>
  260. </table>
  261. <span class="small pull-right mobile-hide">
  262. <span class="divider">|</span>
  263. <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_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.BeforeInit(IPA.Loader.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>
  264. </span>
  265. <span class="small pull-right mobile-hide">
  266. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L64">View Source</a>
  267. </span>
  268. <a id="IPA_Loader_Features_Feature_BeforeInit_" data-uid="IPA.Loader.Features.Feature.BeforeInit*"></a>
  269. <h4 id="IPA_Loader_Features_Feature_BeforeInit_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.BeforeInit(IPA.Loader.PluginMetadata)">BeforeInit(PluginMetadata)</h4>
  270. <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>
  271. </div>
  272. <div class="markdown level1 conceptual"></div>
  273. <h5 class="decalaration">Declaration</h5>
  274. <div class="codewrapper">
  275. <pre><code class="lang-csharp hljs">public virtual bool BeforeInit(PluginMetadata plugin)</code></pre>
  276. </div>
  277. <h5 class="parameters">Parameters</h5>
  278. <table class="table table-bordered table-striped table-condensed">
  279. <thead>
  280. <tr>
  281. <th>Type</th>
  282. <th>Name</th>
  283. <th>Description</th>
  284. </tr>
  285. </thead>
  286. <tbody>
  287. <tr>
  288. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  289. <td><span class="parametername">plugin</span></td>
  290. <td><p>the plugin to be initialized</p>
  291. </td>
  292. </tr>
  293. </tbody>
  294. </table>
  295. <h5 class="returns">Returns</h5>
  296. <table class="table table-bordered table-striped table-condensed">
  297. <thead>
  298. <tr>
  299. <th>Type</th>
  300. <th>Description</th>
  301. </tr>
  302. </thead>
  303. <tbody>
  304. <tr>
  305. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  306. <td><p>whether or not to call the Init method</p>
  307. </td>
  308. </tr>
  309. </tbody>
  310. </table>
  311. <span class="small pull-right mobile-hide">
  312. <span class="divider">|</span>
  313. <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_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.BeforeLoad(IPA.Loader.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>
  314. </span>
  315. <span class="small pull-right mobile-hide">
  316. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L57">View Source</a>
  317. </span>
  318. <a id="IPA_Loader_Features_Feature_BeforeLoad_" data-uid="IPA.Loader.Features.Feature.BeforeLoad*"></a>
  319. <h4 id="IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.BeforeLoad(IPA.Loader.PluginMetadata)">BeforeLoad(PluginMetadata)</h4>
  320. <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>
  321. </div>
  322. <div class="markdown level1 conceptual"></div>
  323. <h5 class="decalaration">Declaration</h5>
  324. <div class="codewrapper">
  325. <pre><code class="lang-csharp hljs">public virtual bool BeforeLoad(PluginMetadata plugin)</code></pre>
  326. </div>
  327. <h5 class="parameters">Parameters</h5>
  328. <table class="table table-bordered table-striped table-condensed">
  329. <thead>
  330. <tr>
  331. <th>Type</th>
  332. <th>Name</th>
  333. <th>Description</th>
  334. </tr>
  335. </thead>
  336. <tbody>
  337. <tr>
  338. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  339. <td><span class="parametername">plugin</span></td>
  340. <td><p>the plugin about to be loaded</p>
  341. </td>
  342. </tr>
  343. </tbody>
  344. </table>
  345. <h5 class="returns">Returns</h5>
  346. <table class="table table-bordered table-striped table-condensed">
  347. <thead>
  348. <tr>
  349. <th>Type</th>
  350. <th>Description</th>
  351. </tr>
  352. </thead>
  353. <tbody>
  354. <tr>
  355. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  356. <td><p>whether or not the plugin should be loaded</p>
  357. </td>
  358. </tr>
  359. </tbody>
  360. </table>
  361. <h5 id="IPA_Loader_Features_Feature_BeforeLoad_IPA_Loader_PluginMetadata__remarks">Remarks</h5>
  362. <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>.
  363. Any features it defines, for example, will still be loaded.</p>
  364. </div>
  365. <span class="small pull-right mobile-hide">
  366. <span class="divider">|</span>
  367. <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>
  368. </span>
  369. <span class="small pull-right mobile-hide">
  370. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L39">View Source</a>
  371. </span>
  372. <a id="IPA_Loader_Features_Feature_Evaluate_" data-uid="IPA.Loader.Features.Feature.Evaluate*"></a>
  373. <h4 id="IPA_Loader_Features_Feature_Evaluate" data-uid="IPA.Loader.Features.Feature.Evaluate">Evaluate()</h4>
  374. <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>
  375. <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_PluginMetadata_System_String___">Initialize(PluginMetadata, String[])</a></p>
  376. </div>
  377. <div class="markdown level1 conceptual"></div>
  378. <h5 class="decalaration">Declaration</h5>
  379. <div class="codewrapper">
  380. <pre><code class="lang-csharp hljs">public virtual bool Evaluate()</code></pre>
  381. </div>
  382. <h5 class="returns">Returns</h5>
  383. <table class="table table-bordered table-striped table-condensed">
  384. <thead>
  385. <tr>
  386. <th>Type</th>
  387. <th>Description</th>
  388. </tr>
  389. </thead>
  390. <tbody>
  391. <tr>
  392. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  393. <td><p>the truthiness of the Feature.</p>
  394. </td>
  395. </tr>
  396. </tbody>
  397. </table>
  398. <span class="small pull-right mobile-hide">
  399. <span class="divider">|</span>
  400. <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_PluginMetadata_System_String___.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.Initialize(IPA.Loader.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>
  401. </span>
  402. <span class="small pull-right mobile-hide">
  403. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L31">View Source</a>
  404. </span>
  405. <a id="IPA_Loader_Features_Feature_Initialize_" data-uid="IPA.Loader.Features.Feature.Initialize*"></a>
  406. <h4 id="IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginMetadata_System_String___" data-uid="IPA.Loader.Features.Feature.Initialize(IPA.Loader.PluginMetadata,System.String[])">Initialize(PluginMetadata, String[])</h4>
  407. <div class="markdown level1 summary"><p>Initializes the feature with the parameters provided in the definition.</p>
  408. <p>Note: When no parenthesis are provided, <code data-dev-comment-type="paramref" class="paramref">parameters</code> is an empty array.</p>
  409. </div>
  410. <div class="markdown level1 conceptual"></div>
  411. <h5 class="decalaration">Declaration</h5>
  412. <div class="codewrapper">
  413. <pre><code class="lang-csharp hljs">public abstract bool Initialize(PluginMetadata meta, string[] parameters)</code></pre>
  414. </div>
  415. <h5 class="parameters">Parameters</h5>
  416. <table class="table table-bordered table-striped table-condensed">
  417. <thead>
  418. <tr>
  419. <th>Type</th>
  420. <th>Name</th>
  421. <th>Description</th>
  422. </tr>
  423. </thead>
  424. <tbody>
  425. <tr>
  426. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  427. <td><span class="parametername">meta</span></td>
  428. <td><p>the metadata of the plugin that is being prepared</p>
  429. </td>
  430. </tr>
  431. <tr>
  432. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a>[]</td>
  433. <td><span class="parametername">parameters</span></td>
  434. <td><p>the parameters passed to the feature definition, or null</p>
  435. </td>
  436. </tr>
  437. </tbody>
  438. </table>
  439. <h5 class="returns">Returns</h5>
  440. <table class="table table-bordered table-striped table-condensed">
  441. <thead>
  442. <tr>
  443. <th>Type</th>
  444. <th>Description</th>
  445. </tr>
  446. </thead>
  447. <tbody>
  448. <tr>
  449. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  450. <td><p><span class="xref">true</span> if the feature is valid for the plugin, <span class="xref">false</span> otherwise</p>
  451. </td>
  452. </tr>
  453. </tbody>
  454. </table>
  455. <h5 id="IPA_Loader_Features_Feature_Initialize_IPA_Loader_PluginMetadata_System_String____remarks">Remarks</h5>
  456. <div class="markdown level1 remarks"><p>This gets called BEFORE <em>your</em> <code>Init</code> method.</p>
  457. <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>
  458. </div>
  459. <span class="small pull-right mobile-hide">
  460. <span class="divider">|</span>
  461. <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_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.Features.Feature.RequireLoaded(IPA.Loader.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>
  462. </span>
  463. <span class="small pull-right mobile-hide">
  464. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L83">View Source</a>
  465. </span>
  466. <a id="IPA_Loader_Features_Feature_RequireLoaded_" data-uid="IPA.Loader.Features.Feature.RequireLoaded*"></a>
  467. <h4 id="IPA_Loader_Features_Feature_RequireLoaded_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.Features.Feature.RequireLoaded(IPA.Loader.PluginMetadata)">RequireLoaded(PluginMetadata)</h4>
  468. <div class="markdown level1 summary"><p>Ensures a plugin&apos;s assembly is loaded. Do not use unless you need to.</p>
  469. </div>
  470. <div class="markdown level1 conceptual"></div>
  471. <h5 class="decalaration">Declaration</h5>
  472. <div class="codewrapper">
  473. <pre><code class="lang-csharp hljs">protected void RequireLoaded(PluginMetadata plugin)</code></pre>
  474. </div>
  475. <h5 class="parameters">Parameters</h5>
  476. <table class="table table-bordered table-striped table-condensed">
  477. <thead>
  478. <tr>
  479. <th>Type</th>
  480. <th>Name</th>
  481. <th>Description</th>
  482. </tr>
  483. </thead>
  484. <tbody>
  485. <tr>
  486. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  487. <td><span class="parametername">plugin</span></td>
  488. <td><p>the plugin to ensure is loaded.</p>
  489. </td>
  490. </tr>
  491. </tbody>
  492. </table>
  493. <h3 id="extensionmethods">Extension Methods</h3>
  494. <div>
  495. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetField__2___0_System_String___1_">ReflectionUtil.SetField&lt;T, U&gt;(T, String, U)</a>
  496. </div>
  497. <div>
  498. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetField__2___1_System_String_">ReflectionUtil.GetField&lt;U, T&gt;(T, String)</a>
  499. </div>
  500. <div>
  501. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetProperty__2___0_System_String___1_">ReflectionUtil.SetProperty&lt;T, U&gt;(T, String, U)</a>
  502. </div>
  503. <div>
  504. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetProperty__2___1_System_String_">ReflectionUtil.GetProperty&lt;U, T&gt;(T, String)</a>
  505. </div>
  506. <div>
  507. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__2___1_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;U, T&gt;(T, String, Object[])</a>
  508. </div>
  509. </article>
  510. </div>
  511. <div class="hidden-sm col-md-2" role="complementary">
  512. <div class="sideaffix">
  513. <div class="contribution">
  514. <ul class="nav">
  515. <li>
  516. <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>
  517. </li>
  518. <li>
  519. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/cb773002846bf95679021a2f387f38ee71e6242d/IPA.Loader/Loader/Features/Feature.cs/#L16" class="contribution-link">View Source</a>
  520. </li>
  521. </ul>
  522. </div>
  523. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  524. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  525. </nav>
  526. </div>
  527. </div>
  528. </div>
  529. </div>
  530. <footer>
  531. <div class="grad-bottom"></div>
  532. <div class="footer">
  533. <div class="container">
  534. <span class="pull-right">
  535. <a href="#top">Back to top</a>
  536. </span>
  537. <span>Generated by <strong>DocFX</strong></span>
  538. </div>
  539. </div>
  540. </footer>
  541. </div>
  542. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  543. <script type="text/javascript" src="../styles/docfx.js"></script>
  544. <script type="text/javascript" src="../styles/main.js"></script>
  545. </body>
  546. </html>