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.

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