FSharp.Configuration
FSharp.Configuration copied to clipboard
Ini type provider: Load another ini file method
Just trying to use the Ini type provider and having trouble with it that I'm not having with other type providers in my build scripts.
In a nutshell the problem is that the IniFile type provider uses the same Ini file that it used to generate the provided types. Would like a .Load("path/to/another/ini/file.ini") that allows me at runtime to dynamically select which Ini file to use and its location. I would expect the API to be the same as the sample INI I gave when writing the script.
FSharp.Data's JSON provider is an example of something that does this: http://fsharp.github.io/FSharp.Data/library/JsonProvider.html
sorry, i probably don't understand what this project is for but isn't quite strange to have the config to be static? actually it would be nice if all configuration provider would provide load/parse function.
@mvkra Good point. I think nobody has used Ini file provider. Go ahead and add Load
.
Is this still planed? I am new to F# and config that can be read and written is necessary for almost all applications. I try to add Load
myself but I have no idea how the ini type work after few hours of reading and trying to understand it. Then I give up and try yaml. I really prefer ini for cleaner look if it will be possible. Thanks for your answer.
No, it's not planned. I've never used this TP and have no plans to use it in the future. This feature should be implemented by someone who does use it.
Ok thanks for info. I will use yaml, because yaml have it.