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.

186 lines
9.7 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>Interface IDisablablePlugin
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Interface IDisablablePlugin
  11. ">
  12. <meta name="generator" content="docfx 2.42.4.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../index.html">
  33. <img id="logo" class="svg" src="../logo.svg" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="IPA.IDisablablePlugin">
  63. <h1 id="IPA_IDisablablePlugin" data-uid="IPA.IDisablablePlugin" class="text-break">Interface IDisablablePlugin
  64. </h1>
  65. <div class="markdown level0 summary"><p>Provides methods to allow runtime enabling and disabling of a plugin.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.html">IPA</a></h6>
  69. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  70. <h5 id="IPA_IDisablablePlugin_syntax">Syntax</h5>
  71. <div class="codewrapper">
  72. <pre><code class="lang-csharp hljs">public interface IDisablablePlugin</code></pre>
  73. </div>
  74. <h3 id="methods">Methods
  75. </h3>
  76. <span class="small pull-right mobile-hide">
  77. <span class="divider">|</span>
  78. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_IDisablablePlugin_OnDisable.md&amp;value=---%0Auid%3A%20IPA.IDisablablePlugin.OnDisable%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>
  79. </span>
  80. <span class="small pull-right mobile-hide">
  81. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs/#L27">View Source</a>
  82. </span>
  83. <a id="IPA_IDisablablePlugin_OnDisable_" data-uid="IPA.IDisablablePlugin.OnDisable*"></a>
  84. <h4 id="IPA_IDisablablePlugin_OnDisable" data-uid="IPA.IDisablablePlugin.OnDisable">OnDisable()</h4>
  85. <div class="markdown level1 summary"><p>Called when a plugin is disabled at runtime. This should disable things like Harmony patches and unsubscribe
  86. from events. After this is called there should be no lingering effects of the mod.</p>
  87. </div>
  88. <div class="markdown level1 conceptual"></div>
  89. <h5 class="decalaration">Declaration</h5>
  90. <div class="codewrapper">
  91. <pre><code class="lang-csharp hljs">void OnDisable()</code></pre>
  92. </div>
  93. <h5 id="IPA_IDisablablePlugin_OnDisable_remarks">Remarks</h5>
  94. <div class="markdown level1 remarks"><p>This will get called at shutdown, after <a class="xref" href="IPA.IBeatSaberPlugin.html#IPA_IBeatSaberPlugin_OnApplicationQuit">OnApplicationQuit()</a>, as well as when the
  95. plugin is disabled at runtime.</p>
  96. </div>
  97. <span class="small pull-right mobile-hide">
  98. <span class="divider">|</span>
  99. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_IDisablablePlugin_OnEnable.md&amp;value=---%0Auid%3A%20IPA.IDisablablePlugin.OnEnable%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>
  100. </span>
  101. <span class="small pull-right mobile-hide">
  102. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs/#L17">View Source</a>
  103. </span>
  104. <a id="IPA_IDisablablePlugin_OnEnable_" data-uid="IPA.IDisablablePlugin.OnEnable*"></a>
  105. <h4 id="IPA_IDisablablePlugin_OnEnable" data-uid="IPA.IDisablablePlugin.OnEnable">OnEnable()</h4>
  106. <div class="markdown level1 summary"><p>Called when a plugin is enabled. This is where you should set up Harmony patches and the like.</p>
  107. </div>
  108. <div class="markdown level1 conceptual"></div>
  109. <h5 class="decalaration">Declaration</h5>
  110. <div class="codewrapper">
  111. <pre><code class="lang-csharp hljs">void OnEnable()</code></pre>
  112. </div>
  113. <h5 id="IPA_IDisablablePlugin_OnEnable_remarks">Remarks</h5>
  114. <div class="markdown level1 remarks"><p>This will be called after Init, and will be called when the plugin loads normally too.
  115. When a plugin is disabled at startup, neither this nor Init will be called until it is enabled.</p>
  116. <p>Init will only ever be called once.</p>
  117. </div>
  118. <h3 id="extensionmethods">Extension Methods</h3>
  119. <div>
  120. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateField_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateField(Object, String, Object)</a>
  121. </div>
  122. <div>
  123. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetPrivateField__1_System_Object_System_String_">ReflectionUtil.GetPrivateField&lt;T&gt;(Object, String)</a>
  124. </div>
  125. <div>
  126. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateProperty_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateProperty(Object, String, Object)</a>
  127. </div>
  128. <div>
  129. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod(Object, String, Object[])</a>
  130. </div>
  131. <div>
  132. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod__1_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod&lt;T&gt;(Object, String, Object[])</a>
  133. </div>
  134. </article>
  135. </div>
  136. <div class="hidden-sm col-md-2" role="complementary">
  137. <div class="sideaffix">
  138. <div class="contribution">
  139. <ul class="nav">
  140. <li>
  141. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_IDisablablePlugin.md&amp;value=---%0Auid%3A%20IPA.IDisablablePlugin%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>
  142. </li>
  143. <li>
  144. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs/#L6" class="contribution-link">View Source</a>
  145. </li>
  146. </ul>
  147. </div>
  148. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  149. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  150. </nav>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <footer>
  156. <div class="grad-bottom"></div>
  157. <div class="footer">
  158. <div class="container">
  159. <span class="pull-right">
  160. <a href="#top">Back to top</a>
  161. </span>
  162. <span>Generated by <strong>DocFX</strong></span>
  163. </div>
  164. </div>
  165. </footer>
  166. </div>
  167. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  168. <script type="text/javascript" src="../styles/docfx.js"></script>
  169. <script type="text/javascript" src="../styles/main.js"></script>
  170. </body>
  171. </html>