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

  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.48.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.Config.IConfigProvider">
  74. <h1 id="IPA_Config_IConfigProvider" data-uid="IPA.Config.IConfigProvider" class="text-break">Interface IConfigProvider
  75. </h1>
  76. <div class="markdown level0 summary"><p>An interface for configuration providers.</p>
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Config.html">IPA.Config</a></h6>
  80. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  81. <h5 id="IPA_Config_IConfigProvider_syntax">Syntax</h5>
  82. <div class="codewrapper">
  83. <pre><code class="lang-csharp hljs">public interface IConfigProvider</code></pre>
  84. </div>
  85. <h5 id="IPA_Config_IConfigProvider_remarks"><strong>Remarks</strong></h5>
  86. <div class="markdown level0 remarks"><p>
  87. Implementers must provide a default constructor. Do not assume that <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.file">File</a> will ever be set for a given object.
  88. </p>
  89. <p>
  90. 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>.
  91. 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
  92. 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>
  93. 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
  94. 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>.
  95. 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>.
  96. </p>
  97. </div>
  98. <h3 id="properties">Properties
  99. </h3>
  100. <span class="small pull-right mobile-hide">
  101. <span class="divider">|</span>
  102. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  103. </span>
  104. <span class="small pull-right mobile-hide">
  105. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/674742a4156d8375ece0cb7bf8a48df6d5ebc7de/IPA.Loader/Config/IConfigProvider.cs/#L33">View Source</a>
  106. </span>
  107. <a id="IPA_Config_IConfigProvider_Extension_" data-uid="IPA.Config.IConfigProvider.Extension*"></a>
  108. <h4 id="IPA_Config_IConfigProvider_Extension" data-uid="IPA.Config.IConfigProvider.Extension">Extension</h4>
  109. <div class="markdown level1 summary"><p>Gets the extension <em>without</em> a dot to use for files handled by this provider.</p>
  110. </div>
  111. <div class="markdown level1 conceptual"></div>
  112. <h5 class="decalaration">Declaration</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">string Extension { get; }</code></pre>
  115. </div>
  116. <h5 class="propertyValue">Property Value</h5>
  117. <table class="table table-bordered table-striped table-condensed">
  118. <thead>
  119. <tr>
  120. <th>Type</th>
  121. <th>Description</th>
  122. </tr>
  123. </thead>
  124. <tbody>
  125. <tr>
  126. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  127. <td></td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. <h5 id="IPA_Config_IConfigProvider_Extension_remarks">Remarks</h5>
  132. <div class="markdown level1 remarks"><p>This must work immediately, and is used to generate the <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a> used to set
  133. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.file">File</a>.</p>
  134. </div>
  135. <h3 id="methods">Methods
  136. </h3>
  137. <span class="small pull-right mobile-hide">
  138. <span class="divider">|</span>
  139. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  140. </span>
  141. <span class="small pull-right mobile-hide">
  142. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/674742a4156d8375ece0cb7bf8a48df6d5ebc7de/IPA.Loader/Config/IConfigProvider.cs/#L48">View Source</a>
  143. </span>
  144. <a id="IPA_Config_IConfigProvider_Load_" data-uid="IPA.Config.IConfigProvider.Load*"></a>
  145. <h4 id="IPA_Config_IConfigProvider_Load_System_IO_FileInfo_" data-uid="IPA.Config.IConfigProvider.Load(System.IO.FileInfo)">Load(FileInfo)</h4>
  146. <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
  147. and returns it.</p>
  148. </div>
  149. <div class="markdown level1 conceptual"></div>
  150. <h5 class="decalaration">Declaration</h5>
  151. <div class="codewrapper">
  152. <pre><code class="lang-csharp hljs">Value Load(FileInfo file)</code></pre>
  153. </div>
  154. <h5 class="parameters">Parameters</h5>
  155. <table class="table table-bordered table-striped table-condensed">
  156. <thead>
  157. <tr>
  158. <th>Type</th>
  159. <th>Name</th>
  160. <th>Description</th>
  161. </tr>
  162. </thead>
  163. <tbody>
  164. <tr>
  165. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a></td>
  166. <td><span class="parametername">file</span></td>
  167. <td><p>the file to read from</p>
  168. </td>
  169. </tr>
  170. </tbody>
  171. </table>
  172. <h5 class="returns">Returns</h5>
  173. <table class="table table-bordered table-striped table-condensed">
  174. <thead>
  175. <tr>
  176. <th>Type</th>
  177. <th>Description</th>
  178. </tr>
  179. </thead>
  180. <tbody>
  181. <tr>
  182. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  183. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> loaded</p>
  184. </td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. <span class="small pull-right mobile-hide">
  189. <span class="divider">|</span>
  190. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  191. </span>
  192. <span class="small pull-right mobile-hide">
  193. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/674742a4156d8375ece0cb7bf8a48df6d5ebc7de/IPA.Loader/Config/IConfigProvider.cs/#L40">View Source</a>
  194. </span>
  195. <a id="IPA_Config_IConfigProvider_Store_" data-uid="IPA.Config.IConfigProvider.Store*"></a>
  196. <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>
  197. <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>
  198. </div>
  199. <div class="markdown level1 conceptual"></div>
  200. <h5 class="decalaration">Declaration</h5>
  201. <div class="codewrapper">
  202. <pre><code class="lang-csharp hljs">void Store(Value value, FileInfo file)</code></pre>
  203. </div>
  204. <h5 class="parameters">Parameters</h5>
  205. <table class="table table-bordered table-striped table-condensed">
  206. <thead>
  207. <tr>
  208. <th>Type</th>
  209. <th>Name</th>
  210. <th>Description</th>
  211. </tr>
  212. </thead>
  213. <tbody>
  214. <tr>
  215. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  216. <td><span class="parametername">value</span></td>
  217. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> to store</p>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a></td>
  222. <td><span class="parametername">file</span></td>
  223. <td><p>the file to write to</p>
  224. </td>
  225. </tr>
  226. </tbody>
  227. </table>
  228. <h3 id="extensionmethods">Extension Methods</h3>
  229. <div>
  230. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetField_System_Object_System_String_System_Object_">ReflectionUtil.SetField(Object, String, Object)</a>
  231. </div>
  232. <div>
  233. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetField__1___0_System_String_System_Object_">ReflectionUtil.SetField&lt;T&gt;(T, String, Object)</a>
  234. </div>
  235. <div>
  236. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetField__1_System_Object_System_String_">ReflectionUtil.GetField&lt;T&gt;(Object, String)</a>
  237. </div>
  238. <div>
  239. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetField__2___1_System_String_">ReflectionUtil.GetField&lt;T, U&gt;(U, String)</a>
  240. </div>
  241. <div>
  242. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetProperty_System_Object_System_String_System_Object_">ReflectionUtil.SetProperty(Object, String, Object)</a>
  243. </div>
  244. <div>
  245. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetProperty__1___0_System_String_System_Object_">ReflectionUtil.SetProperty&lt;T&gt;(T, String, Object)</a>
  246. </div>
  247. <div>
  248. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod_System_Object_System_String_System_Object___">ReflectionUtil.InvokeMethod(Object, String, Object[])</a>
  249. </div>
  250. <div>
  251. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__1___0_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;T&gt;(T, String, Object[])</a>
  252. </div>
  253. <div>
  254. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__1_System_Object_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;T&gt;(Object, String, Object[])</a>
  255. </div>
  256. <div>
  257. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__2___1_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;T, U&gt;(U, String, Object[])</a>
  258. </div>
  259. </article>
  260. </div>
  261. <div class="hidden-sm col-md-2" role="complementary">
  262. <div class="sideaffix">
  263. <div class="contribution">
  264. <ul class="nav">
  265. <li>
  266. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  267. </li>
  268. <li>
  269. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/674742a4156d8375ece0cb7bf8a48df6d5ebc7de/IPA.Loader/Config/IConfigProvider.cs/#L24" class="contribution-link">View Source</a>
  270. </li>
  271. </ul>
  272. </div>
  273. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  274. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  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>