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.

297 lines
15 KiB

5 months ago
5 months ago
5 months ago
5 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>Interface IConfigProvider
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Interface IConfigProvider
  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.IConfigProvider">
  75. <h1 id="IPA_Config_IConfigProvider" data-uid="IPA.Config.IConfigProvider" class="text-break">Interface IConfigProvider
  76. </h1>
  77. <div class="markdown level0 summary"><p>An interface for configuration providers.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Config.html">IPA.Config</a></h6>
  81. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  82. <h5 id="IPA_Config_IConfigProvider_syntax">Syntax</h5>
  83. <div class="codewrapper">
  84. <pre><code class="lang-csharp hljs">public interface IConfigProvider</code></pre>
  85. </div>
  86. <h5 id="IPA_Config_IConfigProvider_remarks"><strong>Remarks</strong></h5>
  87. <div class="markdown level0 remarks"><p>
  88. Implementers must provide a default constructor. Do not assume that <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.file">File</a> will ever be set for a given object.
  89. </p>
  90. <p>
  91. Implementers are expected to preserve the typing of values passed to <a class="xref" href="IPA.Config.IConfigProvider.html#IPA_Config_IConfigProvider_Store_IPA_Config_Data_Value_System_IO_FileInfo_">Store(Value, FileInfo)</a> when returned from <a class="xref" href="IPA.Config.IConfigProvider.html#IPA_Config_IConfigProvider_Load_System_IO_FileInfo_">Load(FileInfo)</a>.
  92. The only exceptions to this are the numeric types, <a class="xref" href="IPA.Config.Data.Integer.html">Integer</a> and <a class="xref" href="IPA.Config.Data.FloatingPoint.html">FloatingPoint</a>, since they can be coerced
  93. to each other with <a class="xref" href="IPA.Config.Data.Integer.html#IPA_Config_Data_Integer_AsFloat">AsFloat()</a> and <a class="xref" href="IPA.Config.Data.FloatingPoint.html#IPA_Config_Data_FloatingPoint_AsInteger">AsInteger()</a> respectively. The provider <em>should</em>
  94. however store and recover <a class="xref" href="IPA.Config.Data.Integer.html">Integer</a> with as much precision as is possible. For example, a JSON provider may decide to
  95. decode all numbers that have an integral value, even if they were originally <a class="xref" href="IPA.Config.Data.FloatingPoint.html">FloatingPoint</a>, as <a class="xref" href="IPA.Config.Data.Integer.html">Integer</a>.
  96. This is reasonable, as <a class="xref" href="IPA.Config.Data.Integer.html">Integer</a> is more precise, particularly with larger values, than <a class="xref" href="IPA.Config.Data.FloatingPoint.html">FloatingPoint</a>.
  97. </p>
  98. </div>
  99. <h3 id="properties">Properties
  100. </h3>
  101. <span class="small pull-right mobile-hide">
  102. <span class="divider">|</span>
  103. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_IConfigProvider_Extension.md&amp;value=---%0Auid%3A%20IPA.Config.IConfigProvider.Extension%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>
  104. </span>
  105. <span class="small pull-right mobile-hide">
  106. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/ab1e43219279fa6d7f01aad39366a5d35ad44b5a/IPA.Loader/Config/IConfigProvider.cs/#L33">View Source</a>
  107. </span>
  108. <a id="IPA_Config_IConfigProvider_Extension_" data-uid="IPA.Config.IConfigProvider.Extension*"></a>
  109. <h4 id="IPA_Config_IConfigProvider_Extension" data-uid="IPA.Config.IConfigProvider.Extension">Extension</h4>
  110. <div class="markdown level1 summary"><p>Gets the extension <em>without</em> a dot to use for files handled by this provider.</p>
  111. </div>
  112. <div class="markdown level1 conceptual"></div>
  113. <h5 class="decalaration">Declaration</h5>
  114. <div class="codewrapper">
  115. <pre><code class="lang-csharp hljs">string Extension { get; }</code></pre>
  116. </div>
  117. <h5 class="propertyValue">Property Value</h5>
  118. <table class="table table-bordered table-striped table-condensed">
  119. <thead>
  120. <tr>
  121. <th>Type</th>
  122. <th>Description</th>
  123. </tr>
  124. </thead>
  125. <tbody>
  126. <tr>
  127. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">String</a></td>
  128. <td></td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. <h5 id="IPA_Config_IConfigProvider_Extension_remarks">Remarks</h5>
  133. <div class="markdown level1 remarks"><p>This must work immediately, and is used to generate the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a> used to set
  134. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.file">File</a>.</p>
  135. </div>
  136. <h3 id="methods">Methods
  137. </h3>
  138. <span class="small pull-right mobile-hide">
  139. <span class="divider">|</span>
  140. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_IConfigProvider_Load_System_IO_FileInfo_.md&amp;value=---%0Auid%3A%20IPA.Config.IConfigProvider.Load(System.IO.FileInfo)%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>
  141. </span>
  142. <span class="small pull-right mobile-hide">
  143. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/ab1e43219279fa6d7f01aad39366a5d35ad44b5a/IPA.Loader/Config/IConfigProvider.cs/#L48">View Source</a>
  144. </span>
  145. <a id="IPA_Config_IConfigProvider_Load_" data-uid="IPA.Config.IConfigProvider.Load*"></a>
  146. <h4 id="IPA_Config_IConfigProvider_Load_System_IO_FileInfo_" data-uid="IPA.Config.IConfigProvider.Load(System.IO.FileInfo)">Load(FileInfo)</h4>
  147. <div class="markdown level1 summary"><p>Loads a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> from disk in whatever format this provider provides
  148. and returns it.</p>
  149. </div>
  150. <div class="markdown level1 conceptual"></div>
  151. <h5 class="decalaration">Declaration</h5>
  152. <div class="codewrapper">
  153. <pre><code class="lang-csharp hljs">Value Load(FileInfo file)</code></pre>
  154. </div>
  155. <h5 class="parameters">Parameters</h5>
  156. <table class="table table-bordered table-striped table-condensed">
  157. <thead>
  158. <tr>
  159. <th>Type</th>
  160. <th>Name</th>
  161. <th>Description</th>
  162. </tr>
  163. </thead>
  164. <tbody>
  165. <tr>
  166. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a></td>
  167. <td><span class="parametername">file</span></td>
  168. <td><p>the file to read from</p>
  169. </td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. <h5 class="returns">Returns</h5>
  174. <table class="table table-bordered table-striped table-condensed">
  175. <thead>
  176. <tr>
  177. <th>Type</th>
  178. <th>Description</th>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. <tr>
  183. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  184. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> loaded</p>
  185. </td>
  186. </tr>
  187. </tbody>
  188. </table>
  189. <span class="small pull-right mobile-hide">
  190. <span class="divider">|</span>
  191. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_IConfigProvider_Store_IPA_Config_Data_Value_System_IO_FileInfo_.md&amp;value=---%0Auid%3A%20IPA.Config.IConfigProvider.Store(IPA.Config.Data.Value%2CSystem.IO.FileInfo)%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>
  192. </span>
  193. <span class="small pull-right mobile-hide">
  194. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/ab1e43219279fa6d7f01aad39366a5d35ad44b5a/IPA.Loader/Config/IConfigProvider.cs/#L40">View Source</a>
  195. </span>
  196. <a id="IPA_Config_IConfigProvider_Store_" data-uid="IPA.Config.IConfigProvider.Store*"></a>
  197. <h4 id="IPA_Config_IConfigProvider_Store_IPA_Config_Data_Value_System_IO_FileInfo_" data-uid="IPA.Config.IConfigProvider.Store(IPA.Config.Data.Value,System.IO.FileInfo)">Store(Value, FileInfo)</h4>
  198. <div class="markdown level1 summary"><p>Stores the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> given to disk in the format specified.</p>
  199. </div>
  200. <div class="markdown level1 conceptual"></div>
  201. <h5 class="decalaration">Declaration</h5>
  202. <div class="codewrapper">
  203. <pre><code class="lang-csharp hljs">void Store(Value value, FileInfo file)</code></pre>
  204. </div>
  205. <h5 class="parameters">Parameters</h5>
  206. <table class="table table-bordered table-striped table-condensed">
  207. <thead>
  208. <tr>
  209. <th>Type</th>
  210. <th>Name</th>
  211. <th>Description</th>
  212. </tr>
  213. </thead>
  214. <tbody>
  215. <tr>
  216. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  217. <td><span class="parametername">value</span></td>
  218. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> to store</p>
  219. </td>
  220. </tr>
  221. <tr>
  222. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a></td>
  223. <td><span class="parametername">file</span></td>
  224. <td><p>the file to write to</p>
  225. </td>
  226. </tr>
  227. </tbody>
  228. </table>
  229. <h3 id="extensionmethods">Extension Methods</h3>
  230. <div>
  231. <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>
  232. </div>
  233. <div>
  234. <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>
  235. </div>
  236. <div>
  237. <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>
  238. </div>
  239. <div>
  240. <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>
  241. </div>
  242. <div>
  243. <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>
  244. </div>
  245. </article>
  246. </div>
  247. <div class="hidden-sm col-md-2" role="complementary">
  248. <div class="sideaffix">
  249. <div class="contribution">
  250. <ul class="nav">
  251. <li>
  252. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_IConfigProvider.md&amp;value=---%0Auid%3A%20IPA.Config.IConfigProvider%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>
  253. </li>
  254. <li>
  255. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/ab1e43219279fa6d7f01aad39366a5d35ad44b5a/IPA.Loader/Config/IConfigProvider.cs/#L24" class="contribution-link">View Source</a>
  256. </li>
  257. </ul>
  258. </div>
  259. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  260. <h5>In This Article</h5>
  261. <div></div>
  262. </nav>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. <footer>
  268. <div class="grad-bottom"></div>
  269. <div class="footer">
  270. <div class="container">
  271. <span class="pull-right">
  272. <a href="#top">Back to top</a>
  273. </span>
  274. <span>Generated by <strong>DocFX</strong></span>
  275. </div>
  276. </div>
  277. </footer>
  278. </div>
  279. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  280. <script type="text/javascript" src="../styles/docfx.js"></script>
  281. <script type="text/javascript" src="../styles/main.js"></script>
  282. </body>
  283. </html>