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.

257 lines
11 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 Extensions
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Extensions
  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.Utilities.Extensions">
  63. <h1 id="IPA_Utilities_Extensions" data-uid="IPA.Utilities.Extensions" class="text-break">Class Extensions
  64. </h1>
  65. <div class="markdown level0 summary"><p>A class providing various extension methods.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><span class="xref">Extensions</span></div>
  72. </div>
  73. <div class="inheritedMembers">
  74. <h5>Inherited Members</h5>
  75. <div>
  76. <span class="xref">System.Object.ToString()</span>
  77. </div>
  78. <div>
  79. <span class="xref">System.Object.Equals(System.Object)</span>
  80. </div>
  81. <div>
  82. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  83. </div>
  84. <div>
  85. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  86. </div>
  87. <div>
  88. <span class="xref">System.Object.GetHashCode()</span>
  89. </div>
  90. <div>
  91. <span class="xref">System.Object.GetType()</span>
  92. </div>
  93. <div>
  94. <span class="xref">System.Object.MemberwiseClone()</span>
  95. </div>
  96. </div>
  97. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.html">IPA.Utilities</a></h6>
  98. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  99. <h5 id="IPA_Utilities_Extensions_syntax">Syntax</h5>
  100. <div class="codewrapper">
  101. <pre><code class="lang-csharp hljs">public static class Extensions</code></pre>
  102. </div>
  103. <h3 id="methods">Methods
  104. </h3>
  105. <span class="small pull-right mobile-hide">
  106. <span class="divider">|</span>
  107. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Utilities_Extensions_GetDefault_System_Type_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Extensions.GetDefault(System.Type)%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>
  108. </span>
  109. <span class="small pull-right mobile-hide">
  110. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Utilities/Extensions.cs/#L15">View Source</a>
  111. </span>
  112. <a id="IPA_Utilities_Extensions_GetDefault_" data-uid="IPA.Utilities.Extensions.GetDefault*"></a>
  113. <h4 id="IPA_Utilities_Extensions_GetDefault_System_Type_" data-uid="IPA.Utilities.Extensions.GetDefault(System.Type)">GetDefault(Type)</h4>
  114. <div class="markdown level1 summary"><p>Gets the default value for a given <span class="xref">System.Type</span>.</p>
  115. </div>
  116. <div class="markdown level1 conceptual"></div>
  117. <h5 class="decalaration">Declaration</h5>
  118. <div class="codewrapper">
  119. <pre><code class="lang-csharp hljs">public static object GetDefault(this Type type)</code></pre>
  120. </div>
  121. <h5 class="parameters">Parameters</h5>
  122. <table class="table table-bordered table-striped table-condensed">
  123. <thead>
  124. <tr>
  125. <th>Type</th>
  126. <th>Name</th>
  127. <th>Description</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. <tr>
  132. <td><span class="xref">System.Type</span></td>
  133. <td><span class="parametername">type</span></td>
  134. <td><p>the <span class="xref">System.Type</span> to get the default value for</p>
  135. </td>
  136. </tr>
  137. </tbody>
  138. </table>
  139. <h5 class="returns">Returns</h5>
  140. <table class="table table-bordered table-striped table-condensed">
  141. <thead>
  142. <tr>
  143. <th>Type</th>
  144. <th>Description</th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. <tr>
  149. <td><span class="xref">System.Object</span></td>
  150. <td><p>the default value of <code data-dev-comment-type="paramref" class="paramref">type</code></p>
  151. </td>
  152. </tr>
  153. </tbody>
  154. </table>
  155. <span class="small pull-right mobile-hide">
  156. <span class="divider">|</span>
  157. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Utilities_Extensions_Unwrap_System_Nullable_System_Boolean__.md&amp;value=---%0Auid%3A%20IPA.Utilities.Extensions.Unwrap(System.Nullable%7BSystem.Boolean%7D)%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>
  158. </span>
  159. <span class="small pull-right mobile-hide">
  160. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Utilities/Extensions.cs/#L25">View Source</a>
  161. </span>
  162. <a id="IPA_Utilities_Extensions_Unwrap_" data-uid="IPA.Utilities.Extensions.Unwrap*"></a>
  163. <h4 id="IPA_Utilities_Extensions_Unwrap_System_Nullable_System_Boolean__" data-uid="IPA.Utilities.Extensions.Unwrap(System.Nullable{System.Boolean})">Unwrap(Nullable&lt;Boolean&gt;)</h4>
  164. <div class="markdown level1 summary"><p>Unwraps a <span class="xref">System.Nullable&lt;T&gt;</span> where T is <span class="xref">System.Boolean</span> such that if the value is null, it gives <span class="xref">false</span>.</p>
  165. </div>
  166. <div class="markdown level1 conceptual"></div>
  167. <h5 class="decalaration">Declaration</h5>
  168. <div class="codewrapper">
  169. <pre><code class="lang-csharp hljs">public static bool Unwrap(this bool? self)</code></pre>
  170. </div>
  171. <h5 class="parameters">Parameters</h5>
  172. <table class="table table-bordered table-striped table-condensed">
  173. <thead>
  174. <tr>
  175. <th>Type</th>
  176. <th>Name</th>
  177. <th>Description</th>
  178. </tr>
  179. </thead>
  180. <tbody>
  181. <tr>
  182. <td><span class="xref">System.Nullable</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  183. <td><span class="parametername">self</span></td>
  184. <td><p>the bool? to unwrap</p>
  185. </td>
  186. </tr>
  187. </tbody>
  188. </table>
  189. <h5 class="returns">Returns</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Description</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td><span class="xref">System.Boolean</span></td>
  200. <td><p>the unwrapped value, or <span class="xref">false</span> if it was <span class="xref">null</span></p>
  201. </td>
  202. </tr>
  203. </tbody>
  204. </table>
  205. </article>
  206. </div>
  207. <div class="hidden-sm col-md-2" role="complementary">
  208. <div class="sideaffix">
  209. <div class="contribution">
  210. <ul class="nav">
  211. <li>
  212. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Utilities_Extensions.md&amp;value=---%0Auid%3A%20IPA.Utilities.Extensions%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>
  213. </li>
  214. <li>
  215. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Utilities/Extensions.cs/#L8" class="contribution-link">View Source</a>
  216. </li>
  217. </ul>
  218. </div>
  219. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  220. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  221. </nav>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <footer>
  227. <div class="grad-bottom"></div>
  228. <div class="footer">
  229. <div class="container">
  230. <span class="pull-right">
  231. <a href="#top">Back to top</a>
  232. </span>
  233. <span>Generated by <strong>DocFX</strong></span>
  234. </div>
  235. </div>
  236. </footer>
  237. </div>
  238. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  239. <script type="text/javascript" src="../styles/docfx.js"></script>
  240. <script type="text/javascript" src="../styles/main.js"></script>
  241. </body>
  242. </html>