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.

555 lines
27 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 Utils
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Utils
  11. ">
  12. <meta name="generator" content="docfx 2.44.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 href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. <meta property="docfx:rel" content="../">
  21. <meta property="docfx:newtab" content="true">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../index.html">
  35. <img id="logo" class="svg" src="../logo.svg" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list"></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="IPA.Utilities.Utils">
  74. <h1 id="IPA_Utilities_Utils" data-uid="IPA.Utilities.Utils" class="text-break">Class Utils
  75. </h1>
  76. <div class="markdown level0 summary"><p>A class providing static utility functions that in any other language would just <em>exist</em>.</p>
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  82. <div class="level1"><span class="xref">Utils</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  88. </div>
  89. <div>
  90. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  91. </div>
  92. <div>
  93. <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>
  94. </div>
  95. <div>
  96. <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>
  97. </div>
  98. <div>
  99. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  106. </div>
  107. </div>
  108. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.html">IPA.Utilities</a></h6>
  109. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  110. <h5 id="IPA_Utilities_Utils_syntax">Syntax</h5>
  111. <div class="codewrapper">
  112. <pre><code class="lang-csharp hljs">public static class Utils</code></pre>
  113. </div>
  114. <h3 id="properties">Properties
  115. </h3>
  116. <span class="small pull-right mobile-hide">
  117. <span class="divider">|</span>
  118. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_CanUseDateTimeNowSafely.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.CanUseDateTimeNowSafely%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>
  119. </span>
  120. <span class="small pull-right mobile-hide">
  121. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L142">View Source</a>
  122. </span>
  123. <a id="IPA_Utilities_Utils_CanUseDateTimeNowSafely_" data-uid="IPA.Utilities.Utils.CanUseDateTimeNowSafely*"></a>
  124. <h4 id="IPA_Utilities_Utils_CanUseDateTimeNowSafely" data-uid="IPA.Utilities.Utils.CanUseDateTimeNowSafely">CanUseDateTimeNowSafely</h4>
  125. <div class="markdown level1 summary"><p>Whether you can safely use <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime.now#System_DateTime_Now">Now</a> without Mono throwing a fit.</p>
  126. </div>
  127. <div class="markdown level1 conceptual"></div>
  128. <h5 class="decalaration">Declaration</h5>
  129. <div class="codewrapper">
  130. <pre><code class="lang-csharp hljs">public static bool CanUseDateTimeNowSafely { get; }</code></pre>
  131. </div>
  132. <h5 class="propertyValue">Property Value</h5>
  133. <table class="table table-bordered table-striped table-condensed">
  134. <thead>
  135. <tr>
  136. <th>Type</th>
  137. <th>Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  143. <td><p><span class="xref">true</span> if you can use <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime.now#System_DateTime_Now">Now</a> safely, <span class="xref">false</span> otherwise</p>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <h3 id="methods">Methods
  149. </h3>
  150. <span class="small pull-right mobile-hide">
  151. <span class="divider">|</span>
  152. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_ByteArrayToString_System_Byte___.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.ByteArrayToString(System.Byte%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  153. </span>
  154. <span class="small pull-right mobile-hide">
  155. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L36">View Source</a>
  156. </span>
  157. <a id="IPA_Utilities_Utils_ByteArrayToString_" data-uid="IPA.Utilities.Utils.ByteArrayToString*"></a>
  158. <h4 id="IPA_Utilities_Utils_ByteArrayToString_System_Byte___" data-uid="IPA.Utilities.Utils.ByteArrayToString(System.Byte[])">ByteArrayToString(Byte[])</h4>
  159. <div class="markdown level1 summary"><p>Converts a byte array to a hex string.</p>
  160. </div>
  161. <div class="markdown level1 conceptual"></div>
  162. <h5 class="decalaration">Declaration</h5>
  163. <div class="codewrapper">
  164. <pre><code class="lang-csharp hljs">public static string ByteArrayToString(byte[] ba)</code></pre>
  165. </div>
  166. <h5 class="parameters">Parameters</h5>
  167. <table class="table table-bordered table-striped table-condensed">
  168. <thead>
  169. <tr>
  170. <th>Type</th>
  171. <th>Name</th>
  172. <th>Description</th>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. <tr>
  177. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.byte">Byte</a>[]</td>
  178. <td><span class="parametername">ba</span></td>
  179. <td><p>the byte array</p>
  180. </td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <h5 class="returns">Returns</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.string">String</a></td>
  195. <td><p>the hex form of the array</p>
  196. </td>
  197. </tr>
  198. </tbody>
  199. </table>
  200. <span class="small pull-right mobile-hide">
  201. <span class="divider">|</span>
  202. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_CopyAll_System_IO_DirectoryInfo_System_IO_DirectoryInfo_System_String_System_Func_System_Exception_System_IO_FileInfo_System_Boolean__.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.CopyAll(System.IO.DirectoryInfo%2CSystem.IO.DirectoryInfo%2CSystem.String%2CSystem.Func%7BSystem.Exception%2CSystem.IO.FileInfo%2CSystem.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>
  203. </span>
  204. <span class="small pull-right mobile-hide">
  205. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L97">View Source</a>
  206. </span>
  207. <a id="IPA_Utilities_Utils_CopyAll_" data-uid="IPA.Utilities.Utils.CopyAll*"></a>
  208. <h4 id="IPA_Utilities_Utils_CopyAll_System_IO_DirectoryInfo_System_IO_DirectoryInfo_System_String_System_Func_System_Exception_System_IO_FileInfo_System_Boolean__" data-uid="IPA.Utilities.Utils.CopyAll(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String,System.Func{System.Exception,System.IO.FileInfo,System.Boolean})">CopyAll(DirectoryInfo, DirectoryInfo, String, Func&lt;Exception, FileInfo, Boolean&gt;)</h4>
  209. <div class="markdown level1 summary"><p>Copies all files from <code data-dev-comment-type="paramref" class="paramref">source</code> to <code data-dev-comment-type="paramref" class="paramref">target</code>.</p>
  210. </div>
  211. <div class="markdown level1 conceptual"></div>
  212. <h5 class="decalaration">Declaration</h5>
  213. <div class="codewrapper">
  214. <pre><code class="lang-csharp hljs">public static void CopyAll(DirectoryInfo source, DirectoryInfo target, string appendFileName = &quot;&quot;, Func&lt;Exception, FileInfo, bool&gt; onCopyException = null)</code></pre>
  215. </div>
  216. <h5 class="parameters">Parameters</h5>
  217. <table class="table table-bordered table-striped table-condensed">
  218. <thead>
  219. <tr>
  220. <th>Type</th>
  221. <th>Name</th>
  222. <th>Description</th>
  223. </tr>
  224. </thead>
  225. <tbody>
  226. <tr>
  227. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.directoryinfo">DirectoryInfo</a></td>
  228. <td><span class="parametername">source</span></td>
  229. <td><p>the source directory</p>
  230. </td>
  231. </tr>
  232. <tr>
  233. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.directoryinfo">DirectoryInfo</a></td>
  234. <td><span class="parametername">target</span></td>
  235. <td><p>the destination directory</p>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  240. <td><span class="parametername">appendFileName</span></td>
  241. <td><p>the filename of the file to append together</p>
  242. </td>
  243. </tr>
  244. <tr>
  245. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.exception">Exception</a>, <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a>, <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a>&gt;</td>
  246. <td><span class="parametername">onCopyException</span></td>
  247. <td><p>a delegate called when there is an error copying. Return true to keep going.</p>
  248. </td>
  249. </tr>
  250. </tbody>
  251. </table>
  252. <span class="small pull-right mobile-hide">
  253. <span class="divider">|</span>
  254. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_CurrentTime.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.CurrentTime%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>
  255. </span>
  256. <span class="small pull-right mobile-hide">
  257. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L152">View Source</a>
  258. </span>
  259. <a id="IPA_Utilities_Utils_CurrentTime_" data-uid="IPA.Utilities.Utils.CurrentTime*"></a>
  260. <h4 id="IPA_Utilities_Utils_CurrentTime" data-uid="IPA.Utilities.Utils.CurrentTime">CurrentTime()</h4>
  261. <div class="markdown level1 summary"><p>Gets the current <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime">DateTime</a> if supported, otherwise, if Mono would throw a fit,
  262. returns <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime.minvalue">MinValue</a> plus some value, such that each time it is called
  263. the value will be greater than the previous result. Not suitable for timing.</p>
  264. </div>
  265. <div class="markdown level1 conceptual"></div>
  266. <h5 class="decalaration">Declaration</h5>
  267. <div class="codewrapper">
  268. <pre><code class="lang-csharp hljs">public static DateTime CurrentTime()</code></pre>
  269. </div>
  270. <h5 class="returns">Returns</h5>
  271. <table class="table table-bordered table-striped table-condensed">
  272. <thead>
  273. <tr>
  274. <th>Type</th>
  275. <th>Description</th>
  276. </tr>
  277. </thead>
  278. <tbody>
  279. <tr>
  280. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
  281. <td><p>the current <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.datetime">DateTime</a> if supported, otherwise some indeterminant increasing value.</p>
  282. </td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <span class="small pull-right mobile-hide">
  287. <span class="divider">|</span>
  288. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_GetRelativePath_System_String_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.GetRelativePath(System.String%2CSystem.String)%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>
  289. </span>
  290. <span class="small pull-right mobile-hide">
  291. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L78">View Source</a>
  292. </span>
  293. <a id="IPA_Utilities_Utils_GetRelativePath_" data-uid="IPA.Utilities.Utils.GetRelativePath*"></a>
  294. <h4 id="IPA_Utilities_Utils_GetRelativePath_System_String_System_String_" data-uid="IPA.Utilities.Utils.GetRelativePath(System.String,System.String)">GetRelativePath(String, String)</h4>
  295. <div class="markdown level1 summary"><p>Gets a path relative to the provided folder.</p>
  296. </div>
  297. <div class="markdown level1 conceptual"></div>
  298. <h5 class="decalaration">Declaration</h5>
  299. <div class="codewrapper">
  300. <pre><code class="lang-csharp hljs">public static string GetRelativePath(string file, string folder)</code></pre>
  301. </div>
  302. <h5 class="parameters">Parameters</h5>
  303. <table class="table table-bordered table-striped table-condensed">
  304. <thead>
  305. <tr>
  306. <th>Type</th>
  307. <th>Name</th>
  308. <th>Description</th>
  309. </tr>
  310. </thead>
  311. <tbody>
  312. <tr>
  313. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  314. <td><span class="parametername">file</span></td>
  315. <td><p>the file to relativize</p>
  316. </td>
  317. </tr>
  318. <tr>
  319. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  320. <td><span class="parametername">folder</span></td>
  321. <td><p>the source folder</p>
  322. </td>
  323. </tr>
  324. </tbody>
  325. </table>
  326. <h5 class="returns">Returns</h5>
  327. <table class="table table-bordered table-striped table-condensed">
  328. <thead>
  329. <tr>
  330. <th>Type</th>
  331. <th>Description</th>
  332. </tr>
  333. </thead>
  334. <tbody>
  335. <tr>
  336. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  337. <td><p>a path to get from <code data-dev-comment-type="paramref" class="paramref">folder</code> to <code data-dev-comment-type="paramref" class="paramref">file</code></p>
  338. </td>
  339. </tr>
  340. </tbody>
  341. </table>
  342. <span class="small pull-right mobile-hide">
  343. <span class="divider">|</span>
  344. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_StringToByteArray_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.StringToByteArray(System.String)%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>
  345. </span>
  346. <span class="small pull-right mobile-hide">
  347. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L22">View Source</a>
  348. </span>
  349. <a id="IPA_Utilities_Utils_StringToByteArray_" data-uid="IPA.Utilities.Utils.StringToByteArray*"></a>
  350. <h4 id="IPA_Utilities_Utils_StringToByteArray_System_String_" data-uid="IPA.Utilities.Utils.StringToByteArray(System.String)">StringToByteArray(String)</h4>
  351. <div class="markdown level1 summary"><p>Converts a hex string to a byte array.</p>
  352. </div>
  353. <div class="markdown level1 conceptual"></div>
  354. <h5 class="decalaration">Declaration</h5>
  355. <div class="codewrapper">
  356. <pre><code class="lang-csharp hljs">public static byte[] StringToByteArray(string hex)</code></pre>
  357. </div>
  358. <h5 class="parameters">Parameters</h5>
  359. <table class="table table-bordered table-striped table-condensed">
  360. <thead>
  361. <tr>
  362. <th>Type</th>
  363. <th>Name</th>
  364. <th>Description</th>
  365. </tr>
  366. </thead>
  367. <tbody>
  368. <tr>
  369. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  370. <td><span class="parametername">hex</span></td>
  371. <td><p>the hex stream</p>
  372. </td>
  373. </tr>
  374. </tbody>
  375. </table>
  376. <h5 class="returns">Returns</h5>
  377. <table class="table table-bordered table-striped table-condensed">
  378. <thead>
  379. <tr>
  380. <th>Type</th>
  381. <th>Description</th>
  382. </tr>
  383. </thead>
  384. <tbody>
  385. <tr>
  386. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.byte">Byte</a>[]</td>
  387. <td><p>the corresponding byte array</p>
  388. </td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. <span class="small pull-right mobile-hide">
  393. <span class="divider">|</span>
  394. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_UnsafeCompare_System_Byte___System_Byte___.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.UnsafeCompare(System.Byte%5B%5D%2CSystem.Byte%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  395. </span>
  396. <span class="small pull-right mobile-hide">
  397. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L54">View Source</a>
  398. </span>
  399. <a id="IPA_Utilities_Utils_UnsafeCompare_" data-uid="IPA.Utilities.Utils.UnsafeCompare*"></a>
  400. <h4 id="IPA_Utilities_Utils_UnsafeCompare_System_Byte___System_Byte___" data-uid="IPA.Utilities.Utils.UnsafeCompare(System.Byte[],System.Byte[])">UnsafeCompare(Byte[], Byte[])</h4>
  401. <div class="markdown level1 summary"><p>Uses unsafe code to compare 2 byte arrays quickly.</p>
  402. </div>
  403. <div class="markdown level1 conceptual"></div>
  404. <h5 class="decalaration">Declaration</h5>
  405. <div class="codewrapper">
  406. <pre><code class="lang-csharp hljs">public static bool UnsafeCompare(byte[] a1, byte[] a2)</code></pre>
  407. </div>
  408. <h5 class="parameters">Parameters</h5>
  409. <table class="table table-bordered table-striped table-condensed">
  410. <thead>
  411. <tr>
  412. <th>Type</th>
  413. <th>Name</th>
  414. <th>Description</th>
  415. </tr>
  416. </thead>
  417. <tbody>
  418. <tr>
  419. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.byte">Byte</a>[]</td>
  420. <td><span class="parametername">a1</span></td>
  421. <td><p>array 1</p>
  422. </td>
  423. </tr>
  424. <tr>
  425. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.byte">Byte</a>[]</td>
  426. <td><span class="parametername">a2</span></td>
  427. <td><p>array 2</p>
  428. </td>
  429. </tr>
  430. </tbody>
  431. </table>
  432. <h5 class="returns">Returns</h5>
  433. <table class="table table-bordered table-striped table-condensed">
  434. <thead>
  435. <tr>
  436. <th>Type</th>
  437. <th>Description</th>
  438. </tr>
  439. </thead>
  440. <tbody>
  441. <tr>
  442. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  443. <td><p>whether or not they are byte-for-byte equal</p>
  444. </td>
  445. </tr>
  446. </tbody>
  447. </table>
  448. <span class="small pull-right mobile-hide">
  449. <span class="divider">|</span>
  450. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils_VersionCompareNoPrerelease_SemVer_Version_SemVer_Version_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils.VersionCompareNoPrerelease(SemVer.Version%2CSemVer.Version)%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>
  451. </span>
  452. <span class="small pull-right mobile-hide">
  453. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L181">View Source</a>
  454. </span>
  455. <a id="IPA_Utilities_Utils_VersionCompareNoPrerelease_" data-uid="IPA.Utilities.Utils.VersionCompareNoPrerelease*"></a>
  456. <h4 id="IPA_Utilities_Utils_VersionCompareNoPrerelease_SemVer_Version_SemVer_Version_" data-uid="IPA.Utilities.Utils.VersionCompareNoPrerelease(SemVer.Version,SemVer.Version)">VersionCompareNoPrerelease(SemVer.Version, SemVer.Version)</h4>
  457. <div class="markdown level1 summary"><p>Compares a pair of <see cref="!:SemVer.Version"></see>s ignoring both the prerelease and build fields.</p>
  458. </div>
  459. <div class="markdown level1 conceptual"></div>
  460. <h5 class="decalaration">Declaration</h5>
  461. <div class="codewrapper">
  462. <pre><code class="lang-csharp hljs">public static int VersionCompareNoPrerelease(SemVer.Version l, SemVer.Version r)</code></pre>
  463. </div>
  464. <h5 class="parameters">Parameters</h5>
  465. <table class="table table-bordered table-striped table-condensed">
  466. <thead>
  467. <tr>
  468. <th>Type</th>
  469. <th>Name</th>
  470. <th>Description</th>
  471. </tr>
  472. </thead>
  473. <tbody>
  474. <tr>
  475. <td><span class="xref">SemVer.Version</span></td>
  476. <td><span class="parametername">l</span></td>
  477. <td><p>the left value</p>
  478. </td>
  479. </tr>
  480. <tr>
  481. <td><span class="xref">SemVer.Version</span></td>
  482. <td><span class="parametername">r</span></td>
  483. <td><p>the right value</p>
  484. </td>
  485. </tr>
  486. </tbody>
  487. </table>
  488. <h5 class="returns">Returns</h5>
  489. <table class="table table-bordered table-striped table-condensed">
  490. <thead>
  491. <tr>
  492. <th>Type</th>
  493. <th>Description</th>
  494. </tr>
  495. </thead>
  496. <tbody>
  497. <tr>
  498. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
  499. <td><p>-1 if l is less than r, 0 if they are equal in the numeric portion, or 1 if l is greater than r</p>
  500. </td>
  501. </tr>
  502. </tbody>
  503. </table>
  504. </article>
  505. </div>
  506. <div class="hidden-sm col-md-2" role="complementary">
  507. <div class="sideaffix">
  508. <div class="contribution">
  509. <ul class="nav">
  510. <li>
  511. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Utils.md&amp;value=---%0Auid%3A%20IPA.Utilities.Utils%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>
  512. </li>
  513. <li>
  514. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/97d38985aa51ee21d0eda4dea1a0e3fd0f7d9b52/IPA.Loader/Utilities/Utils.cs/#L15" class="contribution-link">View Source</a>
  515. </li>
  516. </ul>
  517. </div>
  518. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  519. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  520. </nav>
  521. </div>
  522. </div>
  523. </div>
  524. </div>
  525. <footer>
  526. <div class="grad-bottom"></div>
  527. <div class="footer">
  528. <div class="container">
  529. <span class="pull-right">
  530. <a href="#top">Back to top</a>
  531. </span>
  532. <span>Generated by <strong>DocFX</strong></span>
  533. </div>
  534. </div>
  535. </footer>
  536. </div>
  537. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  538. <script type="text/javascript" src="../styles/docfx.js"></script>
  539. <script type="text/javascript" src="../styles/main.js"></script>
  540. </body>
  541. </html>