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.

903 lines
46 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 StateTransitionTransaction
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class StateTransitionTransaction
  11. ">
  12. <meta name="generator" content="docfx 2.48.1.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.StateTransitionTransaction">
  75. <h1 id="IPA_Loader_StateTransitionTransaction" data-uid="IPA.Loader.StateTransitionTransaction" class="text-break">Class StateTransitionTransaction
  76. </h1>
  77. <div class="markdown level0 summary"><p>A class to represent a transaction for changing the state of loaded mods.</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">StateTransitionTransaction</span></div>
  84. </div>
  85. <div classs="implements">
  86. <h5>Implements</h5>
  87. <div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  88. </div>
  89. <div class="inheritedMembers">
  90. <h5>Inherited Members</h5>
  91. <div>
  92. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  96. </div>
  97. <div>
  98. <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>
  99. </div>
  100. <div>
  101. <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>
  102. </div>
  103. <div>
  104. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  108. </div>
  109. <div>
  110. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  111. </div>
  112. </div>
  113. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Loader.html">IPA.Loader</a></h6>
  114. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  115. <h5 id="IPA_Loader_StateTransitionTransaction_syntax">Syntax</h5>
  116. <div class="codewrapper">
  117. <pre><code class="lang-csharp hljs">public sealed class StateTransitionTransaction : IDisposable</code></pre>
  118. </div>
  119. <h3 id="properties">Properties
  120. </h3>
  121. <span class="small pull-right mobile-hide">
  122. <span class="divider">|</span>
  123. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_DisabledPlugins.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.DisabledPlugins%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>
  124. </span>
  125. <span class="small pull-right mobile-hide">
  126. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L50">View Source</a>
  127. </span>
  128. <a id="IPA_Loader_StateTransitionTransaction_DisabledPlugins_" data-uid="IPA.Loader.StateTransitionTransaction.DisabledPlugins*"></a>
  129. <h4 id="IPA_Loader_StateTransitionTransaction_DisabledPlugins" data-uid="IPA.Loader.StateTransitionTransaction.DisabledPlugins">DisabledPlugins</h4>
  130. <div class="markdown level1 summary"><p>Gets a list of plugins that are disabled according to this transaction&apos;s current state.</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 IEnumerable&lt;PluginMetadata&gt; DisabledPlugins { get; }</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.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a>&gt;</td>
  148. <td></td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <h5 class="exceptions">Exceptions</h5>
  153. <table class="table table-bordered table-striped table-condensed">
  154. <thead>
  155. <tr>
  156. <th>Type</th>
  157. <th>Condition</th>
  158. </tr>
  159. </thead>
  160. <tbody>
  161. <tr>
  162. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  163. <td><p>if this object has been disposed</p>
  164. </td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <span class="small pull-right mobile-hide">
  169. <span class="divider">|</span>
  170. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_EnabledPlugins.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.EnabledPlugins%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>
  171. </span>
  172. <span class="small pull-right mobile-hide">
  173. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L43">View Source</a>
  174. </span>
  175. <a id="IPA_Loader_StateTransitionTransaction_EnabledPlugins_" data-uid="IPA.Loader.StateTransitionTransaction.EnabledPlugins*"></a>
  176. <h4 id="IPA_Loader_StateTransitionTransaction_EnabledPlugins" data-uid="IPA.Loader.StateTransitionTransaction.EnabledPlugins">EnabledPlugins</h4>
  177. <div class="markdown level1 summary"><p>Gets a list of plugins that are enabled according to this transaction&apos;s current state.</p>
  178. </div>
  179. <div class="markdown level1 conceptual"></div>
  180. <h5 class="decalaration">Declaration</h5>
  181. <div class="codewrapper">
  182. <pre><code class="lang-csharp hljs">public IEnumerable&lt;PluginMetadata&gt; EnabledPlugins { get; }</code></pre>
  183. </div>
  184. <h5 class="propertyValue">Property Value</h5>
  185. <table class="table table-bordered table-striped table-condensed">
  186. <thead>
  187. <tr>
  188. <th>Type</th>
  189. <th>Description</th>
  190. </tr>
  191. </thead>
  192. <tbody>
  193. <tr>
  194. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a>&gt;</td>
  195. <td></td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <h5 class="exceptions">Exceptions</h5>
  200. <table class="table table-bordered table-striped table-condensed">
  201. <thead>
  202. <tr>
  203. <th>Type</th>
  204. <th>Condition</th>
  205. </tr>
  206. </thead>
  207. <tbody>
  208. <tr>
  209. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  210. <td><p>if this object has been disposed</p>
  211. </td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. <span class="small pull-right mobile-hide">
  216. <span class="divider">|</span>
  217. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_WillNeedRestart.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.WillNeedRestart%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  218. </span>
  219. <span class="small pull-right mobile-hide">
  220. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L30">View Source</a>
  221. </span>
  222. <a id="IPA_Loader_StateTransitionTransaction_WillNeedRestart_" data-uid="IPA.Loader.StateTransitionTransaction.WillNeedRestart*"></a>
  223. <h4 id="IPA_Loader_StateTransitionTransaction_WillNeedRestart" data-uid="IPA.Loader.StateTransitionTransaction.WillNeedRestart">WillNeedRestart</h4>
  224. <div class="markdown level1 summary"><p>Gets whether or not a game restart will be necessary to fully apply this transaction.</p>
  225. </div>
  226. <div class="markdown level1 conceptual"></div>
  227. <h5 class="decalaration">Declaration</h5>
  228. <div class="codewrapper">
  229. <pre><code class="lang-csharp hljs">public bool WillNeedRestart { get; }</code></pre>
  230. </div>
  231. <h5 class="propertyValue">Property Value</h5>
  232. <table class="table table-bordered table-striped table-condensed">
  233. <thead>
  234. <tr>
  235. <th>Type</th>
  236. <th>Description</th>
  237. </tr>
  238. </thead>
  239. <tbody>
  240. <tr>
  241. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  242. <td><p><span class="xref">true</span> if any mod who&apos;s state is changed cannot be changed at runtime, <span class="xref">false</span> otherwise</p>
  243. </td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. <h5 class="exceptions">Exceptions</h5>
  248. <table class="table table-bordered table-striped table-condensed">
  249. <thead>
  250. <tr>
  251. <th>Type</th>
  252. <th>Condition</th>
  253. </tr>
  254. </thead>
  255. <tbody>
  256. <tr>
  257. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  258. <td><p>if this object has been disposed</p>
  259. </td>
  260. </tr>
  261. </tbody>
  262. </table>
  263. <h3 id="methods">Methods
  264. </h3>
  265. <span class="small pull-right mobile-hide">
  266. <span class="divider">|</span>
  267. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Commit.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Commit%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>
  268. </span>
  269. <span class="small pull-right mobile-hide">
  270. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L223">View Source</a>
  271. </span>
  272. <a id="IPA_Loader_StateTransitionTransaction_Commit_" data-uid="IPA.Loader.StateTransitionTransaction.Commit*"></a>
  273. <h4 id="IPA_Loader_StateTransitionTransaction_Commit" data-uid="IPA.Loader.StateTransitionTransaction.Commit">Commit()</h4>
  274. <div class="markdown level1 summary"><p>Commits this transaction to actual state, enabling and disabling plugins as necessary.</p>
  275. </div>
  276. <div class="markdown level1 conceptual"></div>
  277. <h5 class="decalaration">Declaration</h5>
  278. <div class="codewrapper">
  279. <pre><code class="lang-csharp hljs">public Task Commit()</code></pre>
  280. </div>
  281. <h5 class="returns">Returns</h5>
  282. <table class="table table-bordered table-striped table-condensed">
  283. <thead>
  284. <tr>
  285. <th>Type</th>
  286. <th>Description</th>
  287. </tr>
  288. </thead>
  289. <tbody>
  290. <tr>
  291. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
  292. <td><p>a <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a> which completes whenever all disables complete</p>
  293. </td>
  294. </tr>
  295. </tbody>
  296. </table>
  297. <h5 id="IPA_Loader_StateTransitionTransaction_Commit_remarks">Remarks</h5>
  298. <div class="markdown level1 remarks"><p>After this completes, this transaction will be disposed.</p>
  299. <p>
  300. The <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a> that is returned will error if <strong>any</strong> of the mods being <strong>disabled</strong>
  301. error. It is up to the caller to handle these in a sane way, like logging them. If nothing else, do something like this:
  302. <pre><code>// get your transaction...
  303. var complete = transaction.Commit();
  304. await complete.ContinueWith(t => {
  305. if (t.IsFaulted)
  306. Logger.log.Error($&quot;Error disabling plugins: {t.Exception}&quot;);
  307. });</code></pre>
  308. If you are running in a coroutine, you can use <a class="xref" href="IPA.Utilities.Async.Coroutines.html#IPA_Utilities_Async_Coroutines_WaitForTask_System_Threading_Tasks_Task_">WaitForTask(Task)</a> instead of <span class="xref">await</span>.
  309. </p>
  310. </div>
  311. <h5 class="exceptions">Exceptions</h5>
  312. <table class="table table-bordered table-striped table-condensed">
  313. <thead>
  314. <tr>
  315. <th>Type</th>
  316. <th>Condition</th>
  317. </tr>
  318. </thead>
  319. <tbody>
  320. <tr>
  321. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  322. <td><p>if this object has been disposed</p>
  323. </td>
  324. </tr>
  325. <tr>
  326. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
  327. <td><p>if the plugins&apos; state no longer matches this transaction&apos;s original state</p>
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. <span class="small pull-right mobile-hide">
  333. <span class="divider">|</span>
  334. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Disable(IPA.Loader.PluginMetadata%2CSystem.Boolean)%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>
  335. </span>
  336. <span class="small pull-right mobile-hide">
  337. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L154">View Source</a>
  338. </span>
  339. <a id="IPA_Loader_StateTransitionTransaction_Disable_" data-uid="IPA.Loader.StateTransitionTransaction.Disable*"></a>
  340. <h4 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Boolean_" data-uid="IPA.Loader.StateTransitionTransaction.Disable(IPA.Loader.PluginMetadata,System.Boolean)">Disable(PluginMetadata, Boolean)</h4>
  341. <div class="markdown level1 summary"><p>Disables a plugin in this transaction.</p>
  342. </div>
  343. <div class="markdown level1 conceptual"></div>
  344. <h5 class="decalaration">Declaration</h5>
  345. <div class="codewrapper">
  346. <pre><code class="lang-csharp hljs">public bool Disable(PluginMetadata meta, bool autoDependents = true)</code></pre>
  347. </div>
  348. <h5 class="parameters">Parameters</h5>
  349. <table class="table table-bordered table-striped table-condensed">
  350. <thead>
  351. <tr>
  352. <th>Type</th>
  353. <th>Name</th>
  354. <th>Description</th>
  355. </tr>
  356. </thead>
  357. <tbody>
  358. <tr>
  359. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  360. <td><span class="parametername">meta</span></td>
  361. <td><p>the plugin to disable</p>
  362. </td>
  363. </tr>
  364. <tr>
  365. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  366. <td><span class="parametername">autoDependents</span></td>
  367. <td><p>whether or not to automatically disable all dependents of the plugin</p>
  368. </td>
  369. </tr>
  370. </tbody>
  371. </table>
  372. <h5 class="returns">Returns</h5>
  373. <table class="table table-bordered table-striped table-condensed">
  374. <thead>
  375. <tr>
  376. <th>Type</th>
  377. <th>Description</th>
  378. </tr>
  379. </thead>
  380. <tbody>
  381. <tr>
  382. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  383. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  384. </td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. <h5 class="exceptions">Exceptions</h5>
  389. <table class="table table-bordered table-striped table-condensed">
  390. <thead>
  391. <tr>
  392. <th>Type</th>
  393. <th>Condition</th>
  394. </tr>
  395. </thead>
  396. <tbody>
  397. <tr>
  398. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  399. <td><p>if this object has been disposed</p>
  400. </td>
  401. </tr>
  402. <tr>
  403. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  404. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  405. </td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. <h5 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Boolean__seealso">See Also</h5>
  410. <div class="seealso">
  411. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_">Disable(PluginMetadata, out IEnumerable&lt;PluginMetadata&gt;, Boolean)</a></div>
  412. </div>
  413. <span class="small pull-right mobile-hide">
  414. <span class="divider">|</span>
  415. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Disable(IPA.Loader.PluginMetadata%2CSystem.Collections.Generic.IEnumerable%7BIPA.Loader.PluginMetadata%7D%40%2CSystem.Boolean)%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>
  416. </span>
  417. <span class="small pull-right mobile-hide">
  418. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L169">View Source</a>
  419. </span>
  420. <a id="IPA_Loader_StateTransitionTransaction_Disable_" data-uid="IPA.Loader.StateTransitionTransaction.Disable*"></a>
  421. <h4 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_" data-uid="IPA.Loader.StateTransitionTransaction.Disable(IPA.Loader.PluginMetadata,System.Collections.Generic.IEnumerable{IPA.Loader.PluginMetadata}@,System.Boolean)">Disable(PluginMetadata, out IEnumerable&lt;PluginMetadata&gt;, Boolean)</h4>
  422. <div class="markdown level1 summary"><p>Disables a plugin in this transaction.</p>
  423. </div>
  424. <div class="markdown level1 conceptual"></div>
  425. <h5 class="decalaration">Declaration</h5>
  426. <div class="codewrapper">
  427. <pre><code class="lang-csharp hljs">public bool Disable(PluginMetadata meta, out IEnumerable&lt;PluginMetadata&gt; enabledDependents, bool autoDependents = false)</code></pre>
  428. </div>
  429. <h5 class="parameters">Parameters</h5>
  430. <table class="table table-bordered table-striped table-condensed">
  431. <thead>
  432. <tr>
  433. <th>Type</th>
  434. <th>Name</th>
  435. <th>Description</th>
  436. </tr>
  437. </thead>
  438. <tbody>
  439. <tr>
  440. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  441. <td><span class="parametername">meta</span></td>
  442. <td><p>the plugin to disable</p>
  443. </td>
  444. </tr>
  445. <tr>
  446. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a>&gt;</td>
  447. <td><span class="parametername">enabledDependents</span></td>
  448. <td><p><span class="xref">null</span> if successful, otherwise a set of plugins that need to be disabled first</p>
  449. </td>
  450. </tr>
  451. <tr>
  452. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  453. <td><span class="parametername">autoDependents</span></td>
  454. <td><p>whether or not to automatically disable all dependents of the plugin</p>
  455. </td>
  456. </tr>
  457. </tbody>
  458. </table>
  459. <h5 class="returns">Returns</h5>
  460. <table class="table table-bordered table-striped table-condensed">
  461. <thead>
  462. <tr>
  463. <th>Type</th>
  464. <th>Description</th>
  465. </tr>
  466. </thead>
  467. <tbody>
  468. <tr>
  469. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  470. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  471. </td>
  472. </tr>
  473. </tbody>
  474. </table>
  475. <h5 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean__remarks">Remarks</h5>
  476. <div class="markdown level1 remarks"><p><code data-dev-comment-type="paramref" class="paramref">enabledDependents</code> will only be set when <code data-dev-comment-type="paramref" class="paramref">autoDependents</code> is <span class="xref">false</span>.</p>
  477. </div>
  478. <h5 class="exceptions">Exceptions</h5>
  479. <table class="table table-bordered table-striped table-condensed">
  480. <thead>
  481. <tr>
  482. <th>Type</th>
  483. <th>Condition</th>
  484. </tr>
  485. </thead>
  486. <tbody>
  487. <tr>
  488. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  489. <td><p>if this object has been disposed</p>
  490. </td>
  491. </tr>
  492. <tr>
  493. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  494. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  495. </td>
  496. </tr>
  497. </tbody>
  498. </table>
  499. <span class="small pull-right mobile-hide">
  500. <span class="divider">|</span>
  501. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Dispose.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Dispose%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>
  502. </span>
  503. <span class="small pull-right mobile-hide">
  504. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L237">View Source</a>
  505. </span>
  506. <a id="IPA_Loader_StateTransitionTransaction_Dispose_" data-uid="IPA.Loader.StateTransitionTransaction.Dispose*"></a>
  507. <h4 id="IPA_Loader_StateTransitionTransaction_Dispose" data-uid="IPA.Loader.StateTransitionTransaction.Dispose">Dispose()</h4>
  508. <div class="markdown level1 summary"><p>Disposes and discards this transaction without committing it.</p>
  509. </div>
  510. <div class="markdown level1 conceptual"></div>
  511. <h5 class="decalaration">Declaration</h5>
  512. <div class="codewrapper">
  513. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  514. </div>
  515. <span class="small pull-right mobile-hide">
  516. <span class="divider">|</span>
  517. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Enable(IPA.Loader.PluginMetadata%2CSystem.Boolean)%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>
  518. </span>
  519. <span class="small pull-right mobile-hide">
  520. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L98">View Source</a>
  521. </span>
  522. <a id="IPA_Loader_StateTransitionTransaction_Enable_" data-uid="IPA.Loader.StateTransitionTransaction.Enable*"></a>
  523. <h4 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Boolean_" data-uid="IPA.Loader.StateTransitionTransaction.Enable(IPA.Loader.PluginMetadata,System.Boolean)">Enable(PluginMetadata, Boolean)</h4>
  524. <div class="markdown level1 summary"><p>Enables a plugin in this transaction.</p>
  525. </div>
  526. <div class="markdown level1 conceptual"></div>
  527. <h5 class="decalaration">Declaration</h5>
  528. <div class="codewrapper">
  529. <pre><code class="lang-csharp hljs">public bool Enable(PluginMetadata meta, bool autoDeps = true)</code></pre>
  530. </div>
  531. <h5 class="parameters">Parameters</h5>
  532. <table class="table table-bordered table-striped table-condensed">
  533. <thead>
  534. <tr>
  535. <th>Type</th>
  536. <th>Name</th>
  537. <th>Description</th>
  538. </tr>
  539. </thead>
  540. <tbody>
  541. <tr>
  542. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  543. <td><span class="parametername">meta</span></td>
  544. <td><p>the plugin to enable</p>
  545. </td>
  546. </tr>
  547. <tr>
  548. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  549. <td><span class="parametername">autoDeps</span></td>
  550. <td><p>whether or not to automatically enable all dependencies of the plugin</p>
  551. </td>
  552. </tr>
  553. </tbody>
  554. </table>
  555. <h5 class="returns">Returns</h5>
  556. <table class="table table-bordered table-striped table-condensed">
  557. <thead>
  558. <tr>
  559. <th>Type</th>
  560. <th>Description</th>
  561. </tr>
  562. </thead>
  563. <tbody>
  564. <tr>
  565. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  566. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  567. </td>
  568. </tr>
  569. </tbody>
  570. </table>
  571. <h5 class="exceptions">Exceptions</h5>
  572. <table class="table table-bordered table-striped table-condensed">
  573. <thead>
  574. <tr>
  575. <th>Type</th>
  576. <th>Condition</th>
  577. </tr>
  578. </thead>
  579. <tbody>
  580. <tr>
  581. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  582. <td><p>if this object has been disposed</p>
  583. </td>
  584. </tr>
  585. <tr>
  586. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  587. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  588. </td>
  589. </tr>
  590. </tbody>
  591. </table>
  592. <h5 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Boolean__seealso">See Also</h5>
  593. <div class="seealso">
  594. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_">Enable(PluginMetadata, out IEnumerable&lt;PluginMetadata&gt;, Boolean)</a></div>
  595. </div>
  596. <span class="small pull-right mobile-hide">
  597. <span class="divider">|</span>
  598. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.Enable(IPA.Loader.PluginMetadata%2CSystem.Collections.Generic.IEnumerable%7BIPA.Loader.PluginMetadata%7D%40%2CSystem.Boolean)%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>
  599. </span>
  600. <span class="small pull-right mobile-hide">
  601. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L113">View Source</a>
  602. </span>
  603. <a id="IPA_Loader_StateTransitionTransaction_Enable_" data-uid="IPA.Loader.StateTransitionTransaction.Enable*"></a>
  604. <h4 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean_" data-uid="IPA.Loader.StateTransitionTransaction.Enable(IPA.Loader.PluginMetadata,System.Collections.Generic.IEnumerable{IPA.Loader.PluginMetadata}@,System.Boolean)">Enable(PluginMetadata, out IEnumerable&lt;PluginMetadata&gt;, Boolean)</h4>
  605. <div class="markdown level1 summary"><p>Enables a plugin in this transaction.</p>
  606. </div>
  607. <div class="markdown level1 conceptual"></div>
  608. <h5 class="decalaration">Declaration</h5>
  609. <div class="codewrapper">
  610. <pre><code class="lang-csharp hljs">public bool Enable(PluginMetadata meta, out IEnumerable&lt;PluginMetadata&gt; disabledDeps, bool autoDeps = false)</code></pre>
  611. </div>
  612. <h5 class="parameters">Parameters</h5>
  613. <table class="table table-bordered table-striped table-condensed">
  614. <thead>
  615. <tr>
  616. <th>Type</th>
  617. <th>Name</th>
  618. <th>Description</th>
  619. </tr>
  620. </thead>
  621. <tbody>
  622. <tr>
  623. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  624. <td><span class="parametername">meta</span></td>
  625. <td><p>the plugin to enable</p>
  626. </td>
  627. </tr>
  628. <tr>
  629. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a>&gt;</td>
  630. <td><span class="parametername">disabledDeps</span></td>
  631. <td><p><span class="xref">null</span> if successful, otherwise a set of plugins that need to be enabled first</p>
  632. </td>
  633. </tr>
  634. <tr>
  635. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  636. <td><span class="parametername">autoDeps</span></td>
  637. <td><p>whether or not to automatically enable all dependencies</p>
  638. </td>
  639. </tr>
  640. </tbody>
  641. </table>
  642. <h5 class="returns">Returns</h5>
  643. <table class="table table-bordered table-striped table-condensed">
  644. <thead>
  645. <tr>
  646. <th>Type</th>
  647. <th>Description</th>
  648. </tr>
  649. </thead>
  650. <tbody>
  651. <tr>
  652. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  653. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  654. </td>
  655. </tr>
  656. </tbody>
  657. </table>
  658. <h5 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean__remarks">Remarks</h5>
  659. <div class="markdown level1 remarks"><p><code data-dev-comment-type="paramref" class="paramref">disabledDeps</code> will only be set when <code data-dev-comment-type="paramref" class="paramref">autoDeps</code> is <span class="xref">false</span>.</p>
  660. </div>
  661. <h5 class="exceptions">Exceptions</h5>
  662. <table class="table table-bordered table-striped table-condensed">
  663. <thead>
  664. <tr>
  665. <th>Type</th>
  666. <th>Condition</th>
  667. </tr>
  668. </thead>
  669. <tbody>
  670. <tr>
  671. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  672. <td><p>if this object has been disposed</p>
  673. </td>
  674. </tr>
  675. <tr>
  676. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  677. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  678. </td>
  679. </tr>
  680. </tbody>
  681. </table>
  682. <span class="small pull-right mobile-hide">
  683. <span class="divider">|</span>
  684. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.IsDisabled(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>
  685. </span>
  686. <span class="small pull-right mobile-hide">
  687. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L83">View Source</a>
  688. </span>
  689. <a id="IPA_Loader_StateTransitionTransaction_IsDisabled_" data-uid="IPA.Loader.StateTransitionTransaction.IsDisabled*"></a>
  690. <h4 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.StateTransitionTransaction.IsDisabled(IPA.Loader.PluginMetadata)">IsDisabled(PluginMetadata)</h4>
  691. <div class="markdown level1 summary"><p>Checks if a plugin is disabled according to this transaction&apos;s current state.</p>
  692. </div>
  693. <div class="markdown level1 conceptual"></div>
  694. <h5 class="decalaration">Declaration</h5>
  695. <div class="codewrapper">
  696. <pre><code class="lang-csharp hljs">public bool IsDisabled(PluginMetadata meta)</code></pre>
  697. </div>
  698. <h5 class="parameters">Parameters</h5>
  699. <table class="table table-bordered table-striped table-condensed">
  700. <thead>
  701. <tr>
  702. <th>Type</th>
  703. <th>Name</th>
  704. <th>Description</th>
  705. </tr>
  706. </thead>
  707. <tbody>
  708. <tr>
  709. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  710. <td><span class="parametername">meta</span></td>
  711. <td><p>the plugin to check</p>
  712. </td>
  713. </tr>
  714. </tbody>
  715. </table>
  716. <h5 class="returns">Returns</h5>
  717. <table class="table table-bordered table-striped table-condensed">
  718. <thead>
  719. <tr>
  720. <th>Type</th>
  721. <th>Description</th>
  722. </tr>
  723. </thead>
  724. <tbody>
  725. <tr>
  726. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  727. <td><p><span class="xref">true</span> if the plugin is disabled, <span class="xref">false</span> otherwise</p>
  728. </td>
  729. </tr>
  730. </tbody>
  731. </table>
  732. <h5 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata__remarks">Remarks</h5>
  733. <div class="markdown level1 remarks"><p>This should be roughly equivalent to <code>DisabledPlugins.Contains(meta)</code>, but more performant.</p>
  734. <p>This should also always return the inverse of <a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_">IsEnabled(PluginMetadata)</a> for valid plugins.</p>
  735. </div>
  736. <h5 class="exceptions">Exceptions</h5>
  737. <table class="table table-bordered table-striped table-condensed">
  738. <thead>
  739. <tr>
  740. <th>Type</th>
  741. <th>Condition</th>
  742. </tr>
  743. </thead>
  744. <tbody>
  745. <tr>
  746. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  747. <td><p>if this object has been disposed</p>
  748. </td>
  749. </tr>
  750. </tbody>
  751. </table>
  752. <h5 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata__seealso">See Also</h5>
  753. <div class="seealso">
  754. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_DisabledPlugins">DisabledPlugins</a></div>
  755. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_">IsEnabled(PluginMetadata)</a></div>
  756. </div>
  757. <span class="small pull-right mobile-hide">
  758. <span class="divider">|</span>
  759. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction.IsEnabled(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>
  760. </span>
  761. <span class="small pull-right mobile-hide">
  762. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L66">View Source</a>
  763. </span>
  764. <a id="IPA_Loader_StateTransitionTransaction_IsEnabled_" data-uid="IPA.Loader.StateTransitionTransaction.IsEnabled*"></a>
  765. <h4 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.StateTransitionTransaction.IsEnabled(IPA.Loader.PluginMetadata)">IsEnabled(PluginMetadata)</h4>
  766. <div class="markdown level1 summary"><p>Checks if a plugin is enabled according to this transaction&apos;s current state.</p>
  767. </div>
  768. <div class="markdown level1 conceptual"></div>
  769. <h5 class="decalaration">Declaration</h5>
  770. <div class="codewrapper">
  771. <pre><code class="lang-csharp hljs">public bool IsEnabled(PluginMetadata meta)</code></pre>
  772. </div>
  773. <h5 class="parameters">Parameters</h5>
  774. <table class="table table-bordered table-striped table-condensed">
  775. <thead>
  776. <tr>
  777. <th>Type</th>
  778. <th>Name</th>
  779. <th>Description</th>
  780. </tr>
  781. </thead>
  782. <tbody>
  783. <tr>
  784. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  785. <td><span class="parametername">meta</span></td>
  786. <td><p>the plugin to check</p>
  787. </td>
  788. </tr>
  789. </tbody>
  790. </table>
  791. <h5 class="returns">Returns</h5>
  792. <table class="table table-bordered table-striped table-condensed">
  793. <thead>
  794. <tr>
  795. <th>Type</th>
  796. <th>Description</th>
  797. </tr>
  798. </thead>
  799. <tbody>
  800. <tr>
  801. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  802. <td><p><span class="xref">true</span> if the plugin is enabled, <span class="xref">false</span> otherwise</p>
  803. </td>
  804. </tr>
  805. </tbody>
  806. </table>
  807. <h5 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata__remarks">Remarks</h5>
  808. <div class="markdown level1 remarks"><p>This should be roughly equivalent to <code>EnabledPlugins.Contains(meta)</code>, but more performant.</p>
  809. <p>This should also always return the inverse of <a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_">IsDisabled(PluginMetadata)</a> for valid plugins.</p>
  810. </div>
  811. <h5 class="exceptions">Exceptions</h5>
  812. <table class="table table-bordered table-striped table-condensed">
  813. <thead>
  814. <tr>
  815. <th>Type</th>
  816. <th>Condition</th>
  817. </tr>
  818. </thead>
  819. <tbody>
  820. <tr>
  821. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  822. <td><p>if this object has been disposed</p>
  823. </td>
  824. </tr>
  825. </tbody>
  826. </table>
  827. <h5 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata__seealso">See Also</h5>
  828. <div class="seealso">
  829. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_EnabledPlugins">EnabledPlugins</a></div>
  830. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_">IsDisabled(PluginMetadata)</a></div>
  831. </div>
  832. <h3 id="implements">Implements</h3>
  833. <div>
  834. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">System.IDisposable</a>
  835. </div>
  836. <h3 id="extensionmethods">Extension Methods</h3>
  837. <div>
  838. <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>
  839. </div>
  840. <div>
  841. <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>
  842. </div>
  843. <div>
  844. <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>
  845. </div>
  846. <div>
  847. <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>
  848. </div>
  849. <div>
  850. <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>
  851. </div>
  852. </article>
  853. </div>
  854. <div class="hidden-sm col-md-2" role="complementary">
  855. <div class="sideaffix">
  856. <div class="contribution">
  857. <ul class="nav">
  858. <li>
  859. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/docs/override/new?filename=IPA_Loader_StateTransitionTransaction.md&amp;value=---%0Auid%3A%20IPA.Loader.StateTransitionTransaction%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>
  860. </li>
  861. <li>
  862. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/732bd026715aa1b59e6a20544fd4485e9669d575/IPA.Loader/Loader/StateTransitionTransaction.cs/#L12" class="contribution-link">View Source</a>
  863. </li>
  864. </ul>
  865. </div>
  866. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  867. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  868. </nav>
  869. </div>
  870. </div>
  871. </div>
  872. </div>
  873. <footer>
  874. <div class="grad-bottom"></div>
  875. <div class="footer">
  876. <div class="container">
  877. <span class="pull-right">
  878. <a href="#top">Back to top</a>
  879. </span>
  880. <span>Generated by <strong>DocFX</strong></span>
  881. </div>
  882. </div>
  883. </footer>
  884. </div>
  885. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  886. <script type="text/javascript" src="../styles/docfx.js"></script>
  887. <script type="text/javascript" src="../styles/main.js"></script>
  888. </body>
  889. </html>