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.

352 lines
16 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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>Class CaseInsensitiveEnumConverter&lt;T&gt;
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class CaseInsensitiveEnumConverter&lt;T&gt;
  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.Config.Stores.Converters.CaseInsensitiveEnumConverter`1">
  75. <h1 id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1" data-uid="IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter`1" class="text-break">Class CaseInsensitiveEnumConverter&lt;T&gt;
  76. </h1>
  77. <div class="markdown level0 summary"><p>A converter for an enum of type <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>, that converts the enum to its string representation and back,
  78. ignoring the case of the serialized value for deseiralization.</p>
  79. </div>
  80. <div class="markdown level0 conceptual"></div>
  81. <div class="inheritance">
  82. <h5>Inheritance</h5>
  83. <div class="level0"><span class="xref">System.Object</span></div>
  84. <div class="level1"><a class="xref" href="IPA.Config.Stores.ValueConverter-1.html">ValueConverter</a>&lt;T&gt;</div>
  85. <div class="level2"><span class="xref">CaseInsensitiveEnumConverter&lt;T&gt;</span></div>
  86. </div>
  87. <div class="implements">
  88. <h5>Implements</h5>
  89. <div><a class="xref" href="IPA.Config.Stores.IValueConverter.html">IValueConverter</a></div>
  90. </div>
  91. <div class="inheritedMembers">
  92. <h5>Inherited Members</h5>
  93. <div>
  94. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_ToValue_System_Object_System_Object_">ValueConverter&lt;T&gt;.IValueConverter.ToValue(Object, Object)</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_FromValue_IPA_Config_Data_Value_System_Object_">ValueConverter&lt;T&gt;.IValueConverter.FromValue(Value, Object)</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_Type">ValueConverter&lt;T&gt;.IValueConverter.Type</a>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.ToString()</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.Equals(System.Object)</span>
  107. </div>
  108. <div>
  109. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  110. </div>
  111. <div>
  112. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  113. </div>
  114. <div>
  115. <span class="xref">System.Object.GetHashCode()</span>
  116. </div>
  117. <div>
  118. <span class="xref">System.Object.GetType()</span>
  119. </div>
  120. <div>
  121. <span class="xref">System.Object.MemberwiseClone()</span>
  122. </div>
  123. </div>
  124. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Config.Stores.Converters.html">IPA.Config.Stores.Converters</a></h6>
  125. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  126. <h5 id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_syntax">Syntax</h5>
  127. <div class="codewrapper">
  128. <pre><code class="lang-csharp hljs">public sealed class CaseInsensitiveEnumConverter&lt;T&gt; : ValueConverter&lt;T&gt;, IValueConverter where T : Enum</code></pre>
  129. </div>
  130. <h5 class="typeParameters">Type Parameters</h5>
  131. <table class="table table-bordered table-striped table-condensed">
  132. <thead>
  133. <tr>
  134. <th>Name</th>
  135. <th>Description</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <tr>
  140. <td><span class="parametername">T</span></td>
  141. <td><p>the enum type</p>
  142. </td>
  143. </tr>
  144. </tbody>
  145. </table>
  146. <h3 id="methods">Methods
  147. </h3>
  148. <span class="small pull-right mobile-hide">
  149. <span class="divider">|</span>
  150. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_FromValue_IPA_Config_Data_Value_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter%601.FromValue(IPA.Config.Data.Value%2CSystem.Object)%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>
  151. </span>
  152. <span class="small pull-right mobile-hide">
  153. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/8ca34ff7885ab57323910f2c02ad4737ca2b10f4/IPA.Loader/Config/Stores/Converters.cs/#L271">View Source</a>
  154. </span>
  155. <a id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_FromValue_" data-uid="IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter`1.FromValue*"></a>
  156. <h4 id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_FromValue_IPA_Config_Data_Value_System_Object_" data-uid="IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter`1.FromValue(IPA.Config.Data.Value,System.Object)">FromValue(Value, Object)</h4>
  157. <div class="markdown level1 summary"><p>Converts a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> that is a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node to the corresponding enum value.</p>
  158. </div>
  159. <div class="markdown level1 conceptual"></div>
  160. <h5 class="decalaration">Declaration</h5>
  161. <div class="codewrapper">
  162. <pre><code class="lang-csharp hljs">public override T FromValue(Value value, object parent)</code></pre>
  163. </div>
  164. <h5 class="parameters">Parameters</h5>
  165. <table class="table table-bordered table-striped table-condensed">
  166. <thead>
  167. <tr>
  168. <th>Type</th>
  169. <th>Name</th>
  170. <th>Description</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. <tr>
  175. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  176. <td><span class="parametername">value</span></td>
  177. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> to convert</p>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td><span class="xref">System.Object</span></td>
  182. <td><span class="parametername">parent</span></td>
  183. <td><p>the object which will own the created object</p>
  184. </td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. <h5 class="returns">Returns</h5>
  189. <table class="table table-bordered table-striped table-condensed">
  190. <thead>
  191. <tr>
  192. <th>Type</th>
  193. <th>Description</th>
  194. </tr>
  195. </thead>
  196. <tbody>
  197. <tr>
  198. <td><span class="xref">T</span></td>
  199. <td><p>the deserialized enum value</p>
  200. </td>
  201. </tr>
  202. </tbody>
  203. </table>
  204. <h5 class="overrides">Overrides</h5>
  205. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;T&gt;.FromValue(IPA.Config.Data.Value, System.Object)</span></div>
  206. <h5 class="exceptions">Exceptions</h5>
  207. <table class="table table-bordered table-striped table-condensed">
  208. <thead>
  209. <tr>
  210. <th>Type</th>
  211. <th>Condition</th>
  212. </tr>
  213. </thead>
  214. <tbody>
  215. <tr>
  216. <td><span class="xref">System.ArgumentException</span></td>
  217. <td><p>if <code data-dev-comment-type="paramref" class="paramref">value</code> is not a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node</p>
  218. </td>
  219. </tr>
  220. </tbody>
  221. </table>
  222. <span class="small pull-right mobile-hide">
  223. <span class="divider">|</span>
  224. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_ToValue__0_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter%601.ToValue(%600%2CSystem.Object)%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>
  225. </span>
  226. <span class="small pull-right mobile-hide">
  227. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/8ca34ff7885ab57323910f2c02ad4737ca2b10f4/IPA.Loader/Config/Stores/Converters.cs/#L282">View Source</a>
  228. </span>
  229. <a id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_ToValue_" data-uid="IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter`1.ToValue*"></a>
  230. <h4 id="IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1_ToValue__0_System_Object_" data-uid="IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter`1.ToValue(`0,System.Object)">ToValue(T, Object)</h4>
  231. <div class="markdown level1 summary"><p>Converts an enum of type <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> to a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> node corresponding to its value.</p>
  232. </div>
  233. <div class="markdown level1 conceptual"></div>
  234. <h5 class="decalaration">Declaration</h5>
  235. <div class="codewrapper">
  236. <pre><code class="lang-csharp hljs">public override Value ToValue(T obj, object parent)</code></pre>
  237. </div>
  238. <h5 class="parameters">Parameters</h5>
  239. <table class="table table-bordered table-striped table-condensed">
  240. <thead>
  241. <tr>
  242. <th>Type</th>
  243. <th>Name</th>
  244. <th>Description</th>
  245. </tr>
  246. </thead>
  247. <tbody>
  248. <tr>
  249. <td><span class="xref">T</span></td>
  250. <td><span class="parametername">obj</span></td>
  251. <td><p>the value to serialize</p>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td><span class="xref">System.Object</span></td>
  256. <td><span class="parametername">parent</span></td>
  257. <td><p>the object which owns <code data-dev-comment-type="paramref" class="paramref">obj</code></p>
  258. </td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. <h5 class="returns">Returns</h5>
  263. <table class="table table-bordered table-striped table-condensed">
  264. <thead>
  265. <tr>
  266. <th>Type</th>
  267. <th>Description</th>
  268. </tr>
  269. </thead>
  270. <tbody>
  271. <tr>
  272. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  273. <td><p>a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node representing <code data-dev-comment-type="paramref" class="paramref">obj</code></p>
  274. </td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. <h5 class="overrides">Overrides</h5>
  279. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;T&gt;.ToValue(T, System.Object)</span></div>
  280. <h3 id="implements">Implements</h3>
  281. <div>
  282. <a class="xref" href="IPA.Config.Stores.IValueConverter.html">IValueConverter</a>
  283. </div>
  284. <h3 id="extensionmethods">Extension Methods</h3>
  285. <div>
  286. <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>
  287. </div>
  288. <div>
  289. <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>
  290. </div>
  291. <div>
  292. <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>
  293. </div>
  294. <div>
  295. <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>
  296. </div>
  297. <div>
  298. <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>
  299. </div>
  300. </article>
  301. </div>
  302. <div class="hidden-sm col-md-2" role="complementary">
  303. <div class="sideaffix">
  304. <div class="contribution">
  305. <ul class="nav">
  306. <li>
  307. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_CaseInsensitiveEnumConverter_1.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.CaseInsensitiveEnumConverter%601%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>
  308. </li>
  309. <li>
  310. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/8ca34ff7885ab57323910f2c02ad4737ca2b10f4/IPA.Loader/Config/Stores/Converters.cs/#L261" class="contribution-link">View Source</a>
  311. </li>
  312. </ul>
  313. </div>
  314. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  315. <h5>In This Article</h5>
  316. <div></div>
  317. </nav>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. <footer>
  323. <div class="grad-bottom"></div>
  324. <div class="footer">
  325. <div class="container">
  326. <span class="pull-right">
  327. <a href="#top">Back to top</a>
  328. </span>
  329. <span>Generated by <strong>DocFX</strong></span>
  330. </div>
  331. </div>
  332. </footer>
  333. </div>
  334. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  335. <script type="text/javascript" src="../styles/docfx.js"></script>
  336. <script type="text/javascript" src="../styles/main.js"></script>
  337. </body>
  338. </html>