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.

310 lines
16 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  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>Struct SwitchToUnityMainThreadAwaiter
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Struct SwitchToUnityMainThreadAwaiter
  11. ">
  12. <meta name="generator" content="docfx 2.59.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 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">Search Results for <span></span></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></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.Utilities.SwitchToUnityMainThreadAwaiter">
  75. <h1 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter" class="text-break">Struct SwitchToUnityMainThreadAwaiter
  76. </h1>
  77. <div class="markdown level0 summary"><p>An awaiter which, when awaited, switches the current context to the Unity main thread.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="implements">
  81. <h5>Implements</h5>
  82. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.icriticalnotifycompletion">ICriticalNotifyCompletion</a></div>
  83. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.inotifycompletion">INotifyCompletion</a></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.equals#system-valuetype-equals(system-object)">ValueType.Equals(Object)</a>
  89. </div>
  90. <div>
  91. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode#system-valuetype-gethashcode">ValueType.GetHashCode()</a>
  92. </div>
  93. <div>
  94. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.tostring#system-valuetype-tostring">ValueType.ToString()</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">Object.Equals(Object, Object)</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals#system-object-referenceequals(system-object-system-object)">Object.ReferenceEquals(Object, Object)</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype">Object.GetType()</a>
  104. </div>
  105. </div>
  106. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.html">IPA.Utilities</a></h6>
  107. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  108. <h5 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_syntax">Syntax</h5>
  109. <div class="codewrapper">
  110. <pre><code class="lang-csharp hljs">public struct SwitchToUnityMainThreadAwaiter : ICriticalNotifyCompletion, INotifyCompletion</code></pre>
  111. </div>
  112. <h3 id="properties">Properties
  113. </h3>
  114. <span class="small pull-right mobile-hide">
  115. <span class="divider">|</span>
  116. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_SwitchToUnityMainThreadAwaiter_IsCompleted.md&amp;value=---%0Auid%3A%20IPA.Utilities.SwitchToUnityMainThreadAwaiter.IsCompleted%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>
  117. </span>
  118. <span class="small pull-right mobile-hide">
  119. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/2236b34fe80ae08107933a57221e788cccbc4668/IPA.Loader/Utilities/UnityGame.cs/#L206">View Source</a>
  120. </span>
  121. <a id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_IsCompleted_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.IsCompleted*"></a>
  122. <h4 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_IsCompleted" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.IsCompleted">IsCompleted</h4>
  123. <div class="markdown level1 summary"><p>Gets whether or not this awaiter is completed.</p>
  124. </div>
  125. <div class="markdown level1 conceptual"></div>
  126. <h5 class="decalaration">Declaration</h5>
  127. <div class="codewrapper">
  128. <pre><code class="lang-csharp hljs">public readonly bool IsCompleted { get; }</code></pre>
  129. </div>
  130. <h5 class="propertyValue">Property Value</h5>
  131. <table class="table table-bordered table-striped table-condensed">
  132. <thead>
  133. <tr>
  134. <th>Type</th>
  135. <th>Description</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <tr>
  140. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  141. <td></td>
  142. </tr>
  143. </tbody>
  144. </table>
  145. <h3 id="methods">Methods
  146. </h3>
  147. <span class="small pull-right mobile-hide">
  148. <span class="divider">|</span>
  149. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_SwitchToUnityMainThreadAwaiter_GetResult.md&amp;value=---%0Auid%3A%20IPA.Utilities.SwitchToUnityMainThreadAwaiter.GetResult%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>
  150. </span>
  151. <span class="small pull-right mobile-hide">
  152. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/2236b34fe80ae08107933a57221e788cccbc4668/IPA.Loader/Utilities/UnityGame.cs/#L211">View Source</a>
  153. </span>
  154. <a id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_GetResult_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.GetResult*"></a>
  155. <h4 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_GetResult" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.GetResult">GetResult()</h4>
  156. <div class="markdown level1 summary"><p>Gets the result of this awaiter.</p>
  157. </div>
  158. <div class="markdown level1 conceptual"></div>
  159. <h5 class="decalaration">Declaration</h5>
  160. <div class="codewrapper">
  161. <pre><code class="lang-csharp hljs">public void GetResult()</code></pre>
  162. </div>
  163. <span class="small pull-right mobile-hide">
  164. <span class="divider">|</span>
  165. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_SwitchToUnityMainThreadAwaiter_OnCompleted_System_Action_.md&amp;value=---%0Auid%3A%20IPA.Utilities.SwitchToUnityMainThreadAwaiter.OnCompleted(System.Action)%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>
  166. </span>
  167. <span class="small pull-right mobile-hide">
  168. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/2236b34fe80ae08107933a57221e788cccbc4668/IPA.Loader/Utilities/UnityGame.cs/#L217">View Source</a>
  169. </span>
  170. <a id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_OnCompleted_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.OnCompleted*"></a>
  171. <h4 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_OnCompleted_System_Action_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.OnCompleted(System.Action)">OnCompleted(Action)</h4>
  172. <div class="markdown level1 summary"><p>Registers a continuation to be called when this awaiter finishes.</p>
  173. </div>
  174. <div class="markdown level1 conceptual"></div>
  175. <h5 class="decalaration">Declaration</h5>
  176. <div class="codewrapper">
  177. <pre><code class="lang-csharp hljs">public void OnCompleted(Action continuation)</code></pre>
  178. </div>
  179. <h5 class="parameters">Parameters</h5>
  180. <table class="table table-bordered table-striped table-condensed">
  181. <thead>
  182. <tr>
  183. <th>Type</th>
  184. <th>Name</th>
  185. <th>Description</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. <tr>
  190. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
  191. <td><span class="parametername">continuation</span></td>
  192. <td><p>The continuation.</p>
  193. </td>
  194. </tr>
  195. </tbody>
  196. </table>
  197. <span class="small pull-right mobile-hide">
  198. <span class="divider">|</span>
  199. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_SwitchToUnityMainThreadAwaiter_UnsafeOnCompleted_System_Action_.md&amp;value=---%0Auid%3A%20IPA.Utilities.SwitchToUnityMainThreadAwaiter.UnsafeOnCompleted(System.Action)%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>
  200. </span>
  201. <span class="small pull-right mobile-hide">
  202. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/2236b34fe80ae08107933a57221e788cccbc4668/IPA.Loader/Utilities/UnityGame.cs/#L227">View Source</a>
  203. </span>
  204. <a id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_UnsafeOnCompleted_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.UnsafeOnCompleted*"></a>
  205. <h4 id="IPA_Utilities_SwitchToUnityMainThreadAwaiter_UnsafeOnCompleted_System_Action_" data-uid="IPA.Utilities.SwitchToUnityMainThreadAwaiter.UnsafeOnCompleted(System.Action)">UnsafeOnCompleted(Action)</h4>
  206. <div class="markdown level1 summary"><p>Registers a continuation to be called when this awaiter finishes, without capturing the execution context.</p>
  207. </div>
  208. <div class="markdown level1 conceptual"></div>
  209. <h5 class="decalaration">Declaration</h5>
  210. <div class="codewrapper">
  211. <pre><code class="lang-csharp hljs">public void UnsafeOnCompleted(Action continuation)</code></pre>
  212. </div>
  213. <h5 class="parameters">Parameters</h5>
  214. <table class="table table-bordered table-striped table-condensed">
  215. <thead>
  216. <tr>
  217. <th>Type</th>
  218. <th>Name</th>
  219. <th>Description</th>
  220. </tr>
  221. </thead>
  222. <tbody>
  223. <tr>
  224. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
  225. <td><span class="parametername">continuation</span></td>
  226. <td><p>The continuation.</p>
  227. </td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <h3 id="implements">Implements</h3>
  232. <div>
  233. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.icriticalnotifycompletion">System.Runtime.CompilerServices.ICriticalNotifyCompletion</a>
  234. </div>
  235. <div>
  236. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.inotifycompletion">System.Runtime.CompilerServices.INotifyCompletion</a>
  237. </div>
  238. <h3 id="extensionmethods">Extension Methods</h3>
  239. <div>
  240. <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>
  241. </div>
  242. <div>
  243. <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>
  244. </div>
  245. <div>
  246. <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>
  247. </div>
  248. <div>
  249. <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>
  250. </div>
  251. <div>
  252. <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>
  253. </div>
  254. <h3 id="seealso">See Also</h3>
  255. <div class="seealso">
  256. <div><a class="xref" href="IPA.Utilities.UnityGame.html#IPA_Utilities_UnityGame_SwitchToMainThreadAsync">SwitchToMainThreadAsync()</a></div>
  257. </div>
  258. </article>
  259. </div>
  260. <div class="hidden-sm col-md-2" role="complementary">
  261. <div class="sideaffix">
  262. <div class="contribution">
  263. <ul class="nav">
  264. <li>
  265. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_SwitchToUnityMainThreadAwaiter.md&amp;value=---%0Auid%3A%20IPA.Utilities.SwitchToUnityMainThreadAwaiter%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>
  266. </li>
  267. <li>
  268. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/2236b34fe80ae08107933a57221e788cccbc4668/IPA.Loader/Utilities/UnityGame.cs/#L197" class="contribution-link">View Source</a>
  269. </li>
  270. </ul>
  271. </div>
  272. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  273. <h5>In This Article</h5>
  274. <div></div>
  275. </nav>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. <footer>
  281. <div class="grad-bottom"></div>
  282. <div class="footer">
  283. <div class="container">
  284. <span class="pull-right">
  285. <a href="#top">Back to top</a>
  286. </span>
  287. <span>Generated by <strong>DocFX</strong></span>
  288. </div>
  289. </div>
  290. </footer>
  291. </div>
  292. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  293. <script type="text/javascript" src="../styles/docfx.js"></script>
  294. <script type="text/javascript" src="../styles/main.js"></script>
  295. </body>
  296. </html>