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.

374 lines
20 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 NullableConverter&lt;T&gt;
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class NullableConverter&lt;T&gt;
  11. ">
  12. <meta name="generator" content="docfx 2.59.3.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.NullableConverter`1">
  75. <h1 id="IPA_Config_Stores_Converters_NullableConverter_1" data-uid="IPA.Config.Stores.Converters.NullableConverter`1" class="text-break">Class NullableConverter&lt;T&gt;
  76. </h1>
  77. <div class="markdown level0 summary"><p>A converter for a <see cref="!:Nullable&lt;T>"></see>.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><a class="xref" href="IPA.Config.Stores.ValueConverter-1.html">ValueConverter</a>&lt;<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.nullable-1">Nullable</a>&lt;T&gt;&gt;</div>
  84. <div class="level2"><span class="xref">NullableConverter&lt;T&gt;</span></div>
  85. <div class="level3"><a class="xref" href="IPA.Config.Stores.Converters.NullableConverter-2.html">NullableConverter&lt;T, TConverter&gt;</a></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_Nullable_System_Object__System_Object_">ValueConverter&lt;Nullable&lt;T&gt;&gt;.IValueConverter.ToValue(Nullable&lt;Object&gt;, 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;Nullable&lt;T&gt;&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;Nullable&lt;T&gt;&gt;.IValueConverter.Type</a>
  101. </div>
  102. </div>
  103. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Config.Stores.Converters.html">IPA.Config.Stores.Converters</a></h6>
  104. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  105. <h5 id="IPA_Config_Stores_Converters_NullableConverter_1_syntax">Syntax</h5>
  106. <div class="codewrapper">
  107. <pre><code class="lang-csharp hljs">public class NullableConverter&lt;T&gt; : ValueConverter&lt;T?&gt;, IValueConverter where T : struct</code></pre>
  108. </div>
  109. <h5 class="typeParameters">Type Parameters</h5>
  110. <table class="table table-bordered table-striped table-condensed">
  111. <thead>
  112. <tr>
  113. <th>Name</th>
  114. <th>Description</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. <tr>
  119. <td><span class="parametername">T</span></td>
  120. <td><p>the underlying type of the <see cref="!:Nullable&lt;T>"></see></p>
  121. </td>
  122. </tr>
  123. </tbody>
  124. </table>
  125. <h3 id="constructors">Constructors
  126. </h3>
  127. <span class="small pull-right mobile-hide">
  128. <span class="divider">|</span>
  129. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_NullableConverter_1__ctor.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.NullableConverter%601.%23ctor%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>
  130. </span>
  131. <span class="small pull-right mobile-hide">
  132. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/3fa908a557fb00196c5729237ae859a2e3804623/IPA.Loader/Config/Stores/Converters.cs/#L184">View Source</a>
  133. </span>
  134. <a id="IPA_Config_Stores_Converters_NullableConverter_1__ctor_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.#ctor*"></a>
  135. <h4 id="IPA_Config_Stores_Converters_NullableConverter_1__ctor" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.#ctor">NullableConverter()</h4>
  136. <div class="markdown level1 summary"><p>Creates a converter with the default converter for the base type.
  137. Equivalent to </p>
  138. <pre><code>new NullableConverter(Converter&lt;T>.Default)</code></pre>
  139. </div>
  140. <div class="markdown level1 conceptual"></div>
  141. <h5 class="decalaration">Declaration</h5>
  142. <div class="codewrapper">
  143. <pre><code class="lang-csharp hljs">public NullableConverter()</code></pre>
  144. </div>
  145. <h5 id="IPA_Config_Stores_Converters_NullableConverter_1__ctor_seealso">See Also</h5>
  146. <div class="seealso">
  147. <div><a class="xref" href="IPA.Config.Stores.Converters.NullableConverter-1.html#IPA_Config_Stores_Converters_NullableConverter_1__ctor_IPA_Config_Stores_ValueConverter__0__">NullableConverter(ValueConverter&lt;T&gt;)</a></div>
  148. <div><a class="xref" href="IPA.Config.Stores.Converters.Converter-1.html#IPA_Config_Stores_Converters_Converter_1_Default">Default</a></div>
  149. </div>
  150. <span class="small pull-right mobile-hide">
  151. <span class="divider">|</span>
  152. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_NullableConverter_1__ctor_IPA_Config_Stores_ValueConverter__0__.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.NullableConverter%601.%23ctor(IPA.Config.Stores.ValueConverter%7B%600%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>
  153. </span>
  154. <span class="small pull-right mobile-hide">
  155. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/3fa908a557fb00196c5729237ae859a2e3804623/IPA.Loader/Config/Stores/Converters.cs/#L189">View Source</a>
  156. </span>
  157. <a id="IPA_Config_Stores_Converters_NullableConverter_1__ctor_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.#ctor*"></a>
  158. <h4 id="IPA_Config_Stores_Converters_NullableConverter_1__ctor_IPA_Config_Stores_ValueConverter__0__" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.#ctor(IPA.Config.Stores.ValueConverter{`0})">NullableConverter(ValueConverter&lt;T&gt;)</h4>
  159. <div class="markdown level1 summary"><p>Creates a converter with the given underlying <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html">ValueConverter&lt;T&gt;</a>.</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 NullableConverter(ValueConverter&lt;T&gt; underlying)</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="IPA.Config.Stores.ValueConverter-1.html">ValueConverter</a>&lt;T&gt;</td>
  178. <td><span class="parametername">underlying</span></td>
  179. <td><p>the undlerlying <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html">ValueConverter&lt;T&gt;</a> to use</p>
  180. </td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <h3 id="methods">Methods
  185. </h3>
  186. <span class="small pull-right mobile-hide">
  187. <span class="divider">|</span>
  188. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_NullableConverter_1_FromValue_IPA_Config_Data_Value_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.NullableConverter%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>
  189. </span>
  190. <span class="small pull-right mobile-hide">
  191. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/3fa908a557fb00196c5729237ae859a2e3804623/IPA.Loader/Config/Stores/Converters.cs/#L197">View Source</a>
  192. </span>
  193. <a id="IPA_Config_Stores_Converters_NullableConverter_1_FromValue_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.FromValue*"></a>
  194. <h4 id="IPA_Config_Stores_Converters_NullableConverter_1_FromValue_IPA_Config_Data_Value_System_Object_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.FromValue(IPA.Config.Data.Value,System.Object)">FromValue(Value, Object)</h4>
  195. <div class="markdown level1 summary"><p>Converts a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> tree to a value.</p>
  196. </div>
  197. <div class="markdown level1 conceptual"></div>
  198. <h5 class="decalaration">Declaration</h5>
  199. <div class="codewrapper">
  200. <pre><code class="lang-csharp hljs">public override T? FromValue(Value value, object parent)</code></pre>
  201. </div>
  202. <h5 class="parameters">Parameters</h5>
  203. <table class="table table-bordered table-striped table-condensed">
  204. <thead>
  205. <tr>
  206. <th>Type</th>
  207. <th>Name</th>
  208. <th>Description</th>
  209. </tr>
  210. </thead>
  211. <tbody>
  212. <tr>
  213. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  214. <td><span class="parametername">value</span></td>
  215. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> tree to convert</p>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></td>
  220. <td><span class="parametername">parent</span></td>
  221. <td><p>the object which will own the created object</p>
  222. </td>
  223. </tr>
  224. </tbody>
  225. </table>
  226. <h5 class="returns">Returns</h5>
  227. <table class="table table-bordered table-striped table-condensed">
  228. <thead>
  229. <tr>
  230. <th>Type</th>
  231. <th>Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.nullable-1">Nullable</a>&lt;T&gt;</td>
  237. <td><p>the object represented by <code data-dev-comment-type="paramref" class="paramref">value</code></p>
  238. </td>
  239. </tr>
  240. </tbody>
  241. </table>
  242. <h5 class="overrides">Overrides</h5>
  243. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;System.Nullable&lt;T&gt;&gt;.FromValue(IPA.Config.Data.Value, System.Object)</span></div>
  244. <span class="small pull-right mobile-hide">
  245. <span class="divider">|</span>
  246. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_NullableConverter_1_ToValue_System_Nullable__0__System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.NullableConverter%601.ToValue(System.Nullable%7B%600%7D%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>
  247. </span>
  248. <span class="small pull-right mobile-hide">
  249. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/3fa908a557fb00196c5729237ae859a2e3804623/IPA.Loader/Config/Stores/Converters.cs/#L205">View Source</a>
  250. </span>
  251. <a id="IPA_Config_Stores_Converters_NullableConverter_1_ToValue_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.ToValue*"></a>
  252. <h4 id="IPA_Config_Stores_Converters_NullableConverter_1_ToValue_System_Nullable__0__System_Object_" data-uid="IPA.Config.Stores.Converters.NullableConverter`1.ToValue(System.Nullable{`0},System.Object)">ToValue(Nullable&lt;T&gt;, Object)</h4>
  253. <div class="markdown level1 summary"><p>Converts a nullable <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> to a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> tree.</p>
  254. </div>
  255. <div class="markdown level1 conceptual"></div>
  256. <h5 class="decalaration">Declaration</h5>
  257. <div class="codewrapper">
  258. <pre><code class="lang-csharp hljs">public override Value ToValue(T? obj, object parent)</code></pre>
  259. </div>
  260. <h5 class="parameters">Parameters</h5>
  261. <table class="table table-bordered table-striped table-condensed">
  262. <thead>
  263. <tr>
  264. <th>Type</th>
  265. <th>Name</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.nullable-1">Nullable</a>&lt;T&gt;</td>
  272. <td><span class="parametername">obj</span></td>
  273. <td><p>the value to serialize</p>
  274. </td>
  275. </tr>
  276. <tr>
  277. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></td>
  278. <td><span class="parametername">parent</span></td>
  279. <td><p>the object which owns <code data-dev-comment-type="paramref" class="paramref">obj</code></p>
  280. </td>
  281. </tr>
  282. </tbody>
  283. </table>
  284. <h5 class="returns">Returns</h5>
  285. <table class="table table-bordered table-striped table-condensed">
  286. <thead>
  287. <tr>
  288. <th>Type</th>
  289. <th>Description</th>
  290. </tr>
  291. </thead>
  292. <tbody>
  293. <tr>
  294. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  295. <td><p>a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> tree representing <code data-dev-comment-type="paramref" class="paramref">obj</code>.</p>
  296. </td>
  297. </tr>
  298. </tbody>
  299. </table>
  300. <h5 class="overrides">Overrides</h5>
  301. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;System.Nullable&lt;T&gt;&gt;.ToValue(System.Nullable&lt;T&gt;, System.Object)</span></div>
  302. <h3 id="implements">Implements</h3>
  303. <div>
  304. <a class="xref" href="IPA.Config.Stores.IValueConverter.html">IValueConverter</a>
  305. </div>
  306. <h3 id="extensionmethods">Extension Methods</h3>
  307. <div>
  308. <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>
  309. </div>
  310. <div>
  311. <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>
  312. </div>
  313. <div>
  314. <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>
  315. </div>
  316. <div>
  317. <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>
  318. </div>
  319. <div>
  320. <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>
  321. </div>
  322. </article>
  323. </div>
  324. <div class="hidden-sm col-md-2" role="complementary">
  325. <div class="sideaffix">
  326. <div class="contribution">
  327. <ul class="nav">
  328. <li>
  329. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_NullableConverter_1.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.NullableConverter%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>
  330. </li>
  331. <li>
  332. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/3fa908a557fb00196c5729237ae859a2e3804623/IPA.Loader/Config/Stores/Converters.cs/#L172" class="contribution-link">View Source</a>
  333. </li>
  334. </ul>
  335. </div>
  336. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  337. <h5>In This Article</h5>
  338. <div></div>
  339. </nav>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. <footer>
  345. <div class="grad-bottom"></div>
  346. <div class="footer">
  347. <div class="container">
  348. <span class="pull-right">
  349. <a href="#top">Back to top</a>
  350. </span>
  351. <span>Generated by <strong>DocFX</strong></span>
  352. </div>
  353. </div>
  354. </footer>
  355. </div>
  356. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  357. <script type="text/javascript" src="../styles/docfx.js"></script>
  358. <script type="text/javascript" src="../styles/main.js"></script>
  359. </body>
  360. </html>