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.

908 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.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.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/master/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/21bba770ad75339d67ffbd8ae79c66493308af84/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/master/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/21bba770ad75339d67ffbd8ae79c66493308af84/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/master/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/21bba770ad75339d67ffbd8ae79c66493308af84/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/master/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/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L228">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. <p>
  311. If you are running on the Unity main thread, this will block until all enabling is done, and will return a task representing the disables.
  312. Otherwise, the task returned represents both, and <em>will not complete</em> until Unity has done (possibly) several updates, depending on
  313. the number of plugins being disabled, and the time they take.
  314. </p>
  315. </div>
  316. <h5 class="exceptions">Exceptions</h5>
  317. <table class="table table-bordered table-striped table-condensed">
  318. <thead>
  319. <tr>
  320. <th>Type</th>
  321. <th>Condition</th>
  322. </tr>
  323. </thead>
  324. <tbody>
  325. <tr>
  326. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  327. <td><p>if this object has been disposed</p>
  328. </td>
  329. </tr>
  330. <tr>
  331. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
  332. <td><p>if the plugins&apos; state no longer matches this transaction&apos;s original state</p>
  333. </td>
  334. </tr>
  335. </tbody>
  336. </table>
  337. <span class="small pull-right mobile-hide">
  338. <span class="divider">|</span>
  339. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  340. </span>
  341. <span class="small pull-right mobile-hide">
  342. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L154">View Source</a>
  343. </span>
  344. <a id="IPA_Loader_StateTransitionTransaction_Disable_" data-uid="IPA.Loader.StateTransitionTransaction.Disable*"></a>
  345. <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>
  346. <div class="markdown level1 summary"><p>Disables a plugin in this transaction.</p>
  347. </div>
  348. <div class="markdown level1 conceptual"></div>
  349. <h5 class="decalaration">Declaration</h5>
  350. <div class="codewrapper">
  351. <pre><code class="lang-csharp hljs">public bool Disable(PluginMetadata meta, bool autoDependents = true)</code></pre>
  352. </div>
  353. <h5 class="parameters">Parameters</h5>
  354. <table class="table table-bordered table-striped table-condensed">
  355. <thead>
  356. <tr>
  357. <th>Type</th>
  358. <th>Name</th>
  359. <th>Description</th>
  360. </tr>
  361. </thead>
  362. <tbody>
  363. <tr>
  364. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  365. <td><span class="parametername">meta</span></td>
  366. <td><p>the plugin to disable</p>
  367. </td>
  368. </tr>
  369. <tr>
  370. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  371. <td><span class="parametername">autoDependents</span></td>
  372. <td><p>whether or not to automatically disable all dependents of the plugin</p>
  373. </td>
  374. </tr>
  375. </tbody>
  376. </table>
  377. <h5 class="returns">Returns</h5>
  378. <table class="table table-bordered table-striped table-condensed">
  379. <thead>
  380. <tr>
  381. <th>Type</th>
  382. <th>Description</th>
  383. </tr>
  384. </thead>
  385. <tbody>
  386. <tr>
  387. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  388. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  389. </td>
  390. </tr>
  391. </tbody>
  392. </table>
  393. <h5 class="exceptions">Exceptions</h5>
  394. <table class="table table-bordered table-striped table-condensed">
  395. <thead>
  396. <tr>
  397. <th>Type</th>
  398. <th>Condition</th>
  399. </tr>
  400. </thead>
  401. <tbody>
  402. <tr>
  403. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  404. <td><p>if this object has been disposed</p>
  405. </td>
  406. </tr>
  407. <tr>
  408. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  409. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  410. </td>
  411. </tr>
  412. </tbody>
  413. </table>
  414. <h5 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Boolean__seealso">See Also</h5>
  415. <div class="seealso">
  416. <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>
  417. </div>
  418. <span class="small pull-right mobile-hide">
  419. <span class="divider">|</span>
  420. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  421. </span>
  422. <span class="small pull-right mobile-hide">
  423. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L169">View Source</a>
  424. </span>
  425. <a id="IPA_Loader_StateTransitionTransaction_Disable_" data-uid="IPA.Loader.StateTransitionTransaction.Disable*"></a>
  426. <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>
  427. <div class="markdown level1 summary"><p>Disables a plugin in this transaction.</p>
  428. </div>
  429. <div class="markdown level1 conceptual"></div>
  430. <h5 class="decalaration">Declaration</h5>
  431. <div class="codewrapper">
  432. <pre><code class="lang-csharp hljs">public bool Disable(PluginMetadata meta, out IEnumerable&lt;PluginMetadata&gt; enabledDependents, bool autoDependents = false)</code></pre>
  433. </div>
  434. <h5 class="parameters">Parameters</h5>
  435. <table class="table table-bordered table-striped table-condensed">
  436. <thead>
  437. <tr>
  438. <th>Type</th>
  439. <th>Name</th>
  440. <th>Description</th>
  441. </tr>
  442. </thead>
  443. <tbody>
  444. <tr>
  445. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  446. <td><span class="parametername">meta</span></td>
  447. <td><p>the plugin to disable</p>
  448. </td>
  449. </tr>
  450. <tr>
  451. <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>
  452. <td><span class="parametername">enabledDependents</span></td>
  453. <td><p><span class="xref">null</span> if successful, otherwise a set of plugins that need to be disabled first</p>
  454. </td>
  455. </tr>
  456. <tr>
  457. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  458. <td><span class="parametername">autoDependents</span></td>
  459. <td><p>whether or not to automatically disable all dependents of the plugin</p>
  460. </td>
  461. </tr>
  462. </tbody>
  463. </table>
  464. <h5 class="returns">Returns</h5>
  465. <table class="table table-bordered table-striped table-condensed">
  466. <thead>
  467. <tr>
  468. <th>Type</th>
  469. <th>Description</th>
  470. </tr>
  471. </thead>
  472. <tbody>
  473. <tr>
  474. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  475. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  476. </td>
  477. </tr>
  478. </tbody>
  479. </table>
  480. <h5 id="IPA_Loader_StateTransitionTransaction_Disable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean__remarks">Remarks</h5>
  481. <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>
  482. </div>
  483. <h5 class="exceptions">Exceptions</h5>
  484. <table class="table table-bordered table-striped table-condensed">
  485. <thead>
  486. <tr>
  487. <th>Type</th>
  488. <th>Condition</th>
  489. </tr>
  490. </thead>
  491. <tbody>
  492. <tr>
  493. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  494. <td><p>if this object has been disposed</p>
  495. </td>
  496. </tr>
  497. <tr>
  498. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  499. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  500. </td>
  501. </tr>
  502. </tbody>
  503. </table>
  504. <span class="small pull-right mobile-hide">
  505. <span class="divider">|</span>
  506. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  507. </span>
  508. <span class="small pull-right mobile-hide">
  509. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L242">View Source</a>
  510. </span>
  511. <a id="IPA_Loader_StateTransitionTransaction_Dispose_" data-uid="IPA.Loader.StateTransitionTransaction.Dispose*"></a>
  512. <h4 id="IPA_Loader_StateTransitionTransaction_Dispose" data-uid="IPA.Loader.StateTransitionTransaction.Dispose">Dispose()</h4>
  513. <div class="markdown level1 summary"><p>Disposes and discards this transaction without committing it.</p>
  514. </div>
  515. <div class="markdown level1 conceptual"></div>
  516. <h5 class="decalaration">Declaration</h5>
  517. <div class="codewrapper">
  518. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  519. </div>
  520. <span class="small pull-right mobile-hide">
  521. <span class="divider">|</span>
  522. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  523. </span>
  524. <span class="small pull-right mobile-hide">
  525. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L98">View Source</a>
  526. </span>
  527. <a id="IPA_Loader_StateTransitionTransaction_Enable_" data-uid="IPA.Loader.StateTransitionTransaction.Enable*"></a>
  528. <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>
  529. <div class="markdown level1 summary"><p>Enables a plugin in this transaction.</p>
  530. </div>
  531. <div class="markdown level1 conceptual"></div>
  532. <h5 class="decalaration">Declaration</h5>
  533. <div class="codewrapper">
  534. <pre><code class="lang-csharp hljs">public bool Enable(PluginMetadata meta, bool autoDeps = true)</code></pre>
  535. </div>
  536. <h5 class="parameters">Parameters</h5>
  537. <table class="table table-bordered table-striped table-condensed">
  538. <thead>
  539. <tr>
  540. <th>Type</th>
  541. <th>Name</th>
  542. <th>Description</th>
  543. </tr>
  544. </thead>
  545. <tbody>
  546. <tr>
  547. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  548. <td><span class="parametername">meta</span></td>
  549. <td><p>the plugin to enable</p>
  550. </td>
  551. </tr>
  552. <tr>
  553. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  554. <td><span class="parametername">autoDeps</span></td>
  555. <td><p>whether or not to automatically enable all dependencies of the plugin</p>
  556. </td>
  557. </tr>
  558. </tbody>
  559. </table>
  560. <h5 class="returns">Returns</h5>
  561. <table class="table table-bordered table-striped table-condensed">
  562. <thead>
  563. <tr>
  564. <th>Type</th>
  565. <th>Description</th>
  566. </tr>
  567. </thead>
  568. <tbody>
  569. <tr>
  570. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  571. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  572. </td>
  573. </tr>
  574. </tbody>
  575. </table>
  576. <h5 class="exceptions">Exceptions</h5>
  577. <table class="table table-bordered table-striped table-condensed">
  578. <thead>
  579. <tr>
  580. <th>Type</th>
  581. <th>Condition</th>
  582. </tr>
  583. </thead>
  584. <tbody>
  585. <tr>
  586. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  587. <td><p>if this object has been disposed</p>
  588. </td>
  589. </tr>
  590. <tr>
  591. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  592. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  593. </td>
  594. </tr>
  595. </tbody>
  596. </table>
  597. <h5 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Boolean__seealso">See Also</h5>
  598. <div class="seealso">
  599. <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>
  600. </div>
  601. <span class="small pull-right mobile-hide">
  602. <span class="divider">|</span>
  603. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  604. </span>
  605. <span class="small pull-right mobile-hide">
  606. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L113">View Source</a>
  607. </span>
  608. <a id="IPA_Loader_StateTransitionTransaction_Enable_" data-uid="IPA.Loader.StateTransitionTransaction.Enable*"></a>
  609. <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>
  610. <div class="markdown level1 summary"><p>Enables a plugin in this transaction.</p>
  611. </div>
  612. <div class="markdown level1 conceptual"></div>
  613. <h5 class="decalaration">Declaration</h5>
  614. <div class="codewrapper">
  615. <pre><code class="lang-csharp hljs">public bool Enable(PluginMetadata meta, out IEnumerable&lt;PluginMetadata&gt; disabledDeps, bool autoDeps = false)</code></pre>
  616. </div>
  617. <h5 class="parameters">Parameters</h5>
  618. <table class="table table-bordered table-striped table-condensed">
  619. <thead>
  620. <tr>
  621. <th>Type</th>
  622. <th>Name</th>
  623. <th>Description</th>
  624. </tr>
  625. </thead>
  626. <tbody>
  627. <tr>
  628. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  629. <td><span class="parametername">meta</span></td>
  630. <td><p>the plugin to enable</p>
  631. </td>
  632. </tr>
  633. <tr>
  634. <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>
  635. <td><span class="parametername">disabledDeps</span></td>
  636. <td><p><span class="xref">null</span> if successful, otherwise a set of plugins that need to be enabled first</p>
  637. </td>
  638. </tr>
  639. <tr>
  640. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  641. <td><span class="parametername">autoDeps</span></td>
  642. <td><p>whether or not to automatically enable all dependencies</p>
  643. </td>
  644. </tr>
  645. </tbody>
  646. </table>
  647. <h5 class="returns">Returns</h5>
  648. <table class="table table-bordered table-striped table-condensed">
  649. <thead>
  650. <tr>
  651. <th>Type</th>
  652. <th>Description</th>
  653. </tr>
  654. </thead>
  655. <tbody>
  656. <tr>
  657. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  658. <td><p><span class="xref">true</span> if the transaction&apos;s state was changed, <span class="xref">false</span> otherwise</p>
  659. </td>
  660. </tr>
  661. </tbody>
  662. </table>
  663. <h5 id="IPA_Loader_StateTransitionTransaction_Enable_IPA_Loader_PluginMetadata_System_Collections_Generic_IEnumerable_IPA_Loader_PluginMetadata___System_Boolean__remarks">Remarks</h5>
  664. <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>
  665. </div>
  666. <h5 class="exceptions">Exceptions</h5>
  667. <table class="table table-bordered table-striped table-condensed">
  668. <thead>
  669. <tr>
  670. <th>Type</th>
  671. <th>Condition</th>
  672. </tr>
  673. </thead>
  674. <tbody>
  675. <tr>
  676. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  677. <td><p>if this object has been disposed</p>
  678. </td>
  679. </tr>
  680. <tr>
  681. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  682. <td><p>if <code data-dev-comment-type="paramref" class="paramref">meta</code> is not loadable</p>
  683. </td>
  684. </tr>
  685. </tbody>
  686. </table>
  687. <span class="small pull-right mobile-hide">
  688. <span class="divider">|</span>
  689. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  690. </span>
  691. <span class="small pull-right mobile-hide">
  692. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L83">View Source</a>
  693. </span>
  694. <a id="IPA_Loader_StateTransitionTransaction_IsDisabled_" data-uid="IPA.Loader.StateTransitionTransaction.IsDisabled*"></a>
  695. <h4 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.StateTransitionTransaction.IsDisabled(IPA.Loader.PluginMetadata)">IsDisabled(PluginMetadata)</h4>
  696. <div class="markdown level1 summary"><p>Checks if a plugin is disabled according to this transaction&apos;s current state.</p>
  697. </div>
  698. <div class="markdown level1 conceptual"></div>
  699. <h5 class="decalaration">Declaration</h5>
  700. <div class="codewrapper">
  701. <pre><code class="lang-csharp hljs">public bool IsDisabled(PluginMetadata meta)</code></pre>
  702. </div>
  703. <h5 class="parameters">Parameters</h5>
  704. <table class="table table-bordered table-striped table-condensed">
  705. <thead>
  706. <tr>
  707. <th>Type</th>
  708. <th>Name</th>
  709. <th>Description</th>
  710. </tr>
  711. </thead>
  712. <tbody>
  713. <tr>
  714. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  715. <td><span class="parametername">meta</span></td>
  716. <td><p>the plugin to check</p>
  717. </td>
  718. </tr>
  719. </tbody>
  720. </table>
  721. <h5 class="returns">Returns</h5>
  722. <table class="table table-bordered table-striped table-condensed">
  723. <thead>
  724. <tr>
  725. <th>Type</th>
  726. <th>Description</th>
  727. </tr>
  728. </thead>
  729. <tbody>
  730. <tr>
  731. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  732. <td><p><span class="xref">true</span> if the plugin is disabled, <span class="xref">false</span> otherwise</p>
  733. </td>
  734. </tr>
  735. </tbody>
  736. </table>
  737. <h5 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata__remarks">Remarks</h5>
  738. <div class="markdown level1 remarks"><p>This should be roughly equivalent to <code>DisabledPlugins.Contains(meta)</code>, but more performant.</p>
  739. <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>
  740. </div>
  741. <h5 class="exceptions">Exceptions</h5>
  742. <table class="table table-bordered table-striped table-condensed">
  743. <thead>
  744. <tr>
  745. <th>Type</th>
  746. <th>Condition</th>
  747. </tr>
  748. </thead>
  749. <tbody>
  750. <tr>
  751. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  752. <td><p>if this object has been disposed</p>
  753. </td>
  754. </tr>
  755. </tbody>
  756. </table>
  757. <h5 id="IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata__seealso">See Also</h5>
  758. <div class="seealso">
  759. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_DisabledPlugins">DisabledPlugins</a></div>
  760. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_">IsEnabled(PluginMetadata)</a></div>
  761. </div>
  762. <span class="small pull-right mobile-hide">
  763. <span class="divider">|</span>
  764. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  765. </span>
  766. <span class="small pull-right mobile-hide">
  767. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L66">View Source</a>
  768. </span>
  769. <a id="IPA_Loader_StateTransitionTransaction_IsEnabled_" data-uid="IPA.Loader.StateTransitionTransaction.IsEnabled*"></a>
  770. <h4 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata_" data-uid="IPA.Loader.StateTransitionTransaction.IsEnabled(IPA.Loader.PluginMetadata)">IsEnabled(PluginMetadata)</h4>
  771. <div class="markdown level1 summary"><p>Checks if a plugin is enabled according to this transaction&apos;s current state.</p>
  772. </div>
  773. <div class="markdown level1 conceptual"></div>
  774. <h5 class="decalaration">Declaration</h5>
  775. <div class="codewrapper">
  776. <pre><code class="lang-csharp hljs">public bool IsEnabled(PluginMetadata meta)</code></pre>
  777. </div>
  778. <h5 class="parameters">Parameters</h5>
  779. <table class="table table-bordered table-striped table-condensed">
  780. <thead>
  781. <tr>
  782. <th>Type</th>
  783. <th>Name</th>
  784. <th>Description</th>
  785. </tr>
  786. </thead>
  787. <tbody>
  788. <tr>
  789. <td><a class="xref" href="IPA.Loader.PluginMetadata.html">PluginMetadata</a></td>
  790. <td><span class="parametername">meta</span></td>
  791. <td><p>the plugin to check</p>
  792. </td>
  793. </tr>
  794. </tbody>
  795. </table>
  796. <h5 class="returns">Returns</h5>
  797. <table class="table table-bordered table-striped table-condensed">
  798. <thead>
  799. <tr>
  800. <th>Type</th>
  801. <th>Description</th>
  802. </tr>
  803. </thead>
  804. <tbody>
  805. <tr>
  806. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  807. <td><p><span class="xref">true</span> if the plugin is enabled, <span class="xref">false</span> otherwise</p>
  808. </td>
  809. </tr>
  810. </tbody>
  811. </table>
  812. <h5 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata__remarks">Remarks</h5>
  813. <div class="markdown level1 remarks"><p>This should be roughly equivalent to <code>EnabledPlugins.Contains(meta)</code>, but more performant.</p>
  814. <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>
  815. </div>
  816. <h5 class="exceptions">Exceptions</h5>
  817. <table class="table table-bordered table-striped table-condensed">
  818. <thead>
  819. <tr>
  820. <th>Type</th>
  821. <th>Condition</th>
  822. </tr>
  823. </thead>
  824. <tbody>
  825. <tr>
  826. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  827. <td><p>if this object has been disposed</p>
  828. </td>
  829. </tr>
  830. </tbody>
  831. </table>
  832. <h5 id="IPA_Loader_StateTransitionTransaction_IsEnabled_IPA_Loader_PluginMetadata__seealso">See Also</h5>
  833. <div class="seealso">
  834. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_EnabledPlugins">EnabledPlugins</a></div>
  835. <div><a class="xref" href="IPA.Loader.StateTransitionTransaction.html#IPA_Loader_StateTransitionTransaction_IsDisabled_IPA_Loader_PluginMetadata_">IsDisabled(PluginMetadata)</a></div>
  836. </div>
  837. <h3 id="implements">Implements</h3>
  838. <div>
  839. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">System.IDisposable</a>
  840. </div>
  841. <h3 id="extensionmethods">Extension Methods</h3>
  842. <div>
  843. <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>
  844. </div>
  845. <div>
  846. <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>
  847. </div>
  848. <div>
  849. <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>
  850. </div>
  851. <div>
  852. <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>
  853. </div>
  854. <div>
  855. <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>
  856. </div>
  857. </article>
  858. </div>
  859. <div class="hidden-sm col-md-2" role="complementary">
  860. <div class="sideaffix">
  861. <div class="contribution">
  862. <ul class="nav">
  863. <li>
  864. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/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>
  865. </li>
  866. <li>
  867. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/21bba770ad75339d67ffbd8ae79c66493308af84/IPA.Loader/Loader/StateTransitionTransaction.cs/#L12" class="contribution-link">View Source</a>
  868. </li>
  869. </ul>
  870. </div>
  871. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  872. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  873. </nav>
  874. </div>
  875. </div>
  876. </div>
  877. </div>
  878. <footer>
  879. <div class="grad-bottom"></div>
  880. <div class="footer">
  881. <div class="container">
  882. <span class="pull-right">
  883. <a href="#top">Back to top</a>
  884. </span>
  885. <span>Generated by <strong>DocFX</strong></span>
  886. </div>
  887. </div>
  888. </footer>
  889. </div>
  890. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  891. <script type="text/javascript" src="../styles/docfx.js"></script>
  892. <script type="text/javascript" src="../styles/main.js"></script>
  893. </body>
  894. </html>