spadger / simple-config Goto Github PK
View Code? Open in Web Editor NEWA .Net convention-based config to object binder
License: GNU Lesser General Public License v3.0
A .Net convention-based config to object binder
License: GNU Lesser General Public License v3.0
This works fine with internal classes, but when I try to use an internal interface as settings container, I get Type 'SimpleConfig.Dynamic.InterfaceImplementations._MyAssembly.IServiceSettings_Impl' from assembly 'SimpleConfig.Dynamic.InterfaceImplementations, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is attempting to implement an inaccessible interface.
I've tried to make my InternalsVisibleTo
"SimpleConfig", but that doesn't help. Any idea?
I try a pull request, but it look like the .travis.yaml file is missing. So, the CI integration dosn't work.
Thanks.
Is there support for section groups in this library?
How should the config file be arranged to import a dictionary (eg. IDictionary<double, string>)?
I get an error during compilation of my solution: Assembly generation failed -- Referenced assembly 'SimpleConfigSections' does not have a strong name
The reason for this is that you didn't use strong naming to sign your assembly. This means I'm forced to use a different kind of Configuration library. Not strong naming my own solution is out of the question.
How may I include default values for each configurable value, to be used in the case that the config file was invalid?
I tried to use simple-config but on the dynamic cast of the section I'm having the error:
" does not inherit from 'System.Configuration.IConfigurationSectionHandler"
I'm sure it must be something very easy, but I'm finding difficult to find it.
Isn't there a tutorial of how to use Simple-Config?
Thanks
If I have:
public class ApiKeyUser
{
public string ApiKey { get; set; }
public string Name { get; set; }
public IEnumerable<string> Roles { get; set; }
}
public class ApiKeyUsers
{
public IEnumerable<ApiKeyUser> Users { get; set; }
}
Is this supported:
ApiKeyUsers foo = (dynamic)ConfigurationManager.GetSection("ApiKeyUsers");
Assuming I have configured:
<section name="ApiKeyUsers" type="SimpleConfig.SimpleConfigHandler, SimpleConfig" />
...
<ApiKeyUsers>
<ApiKeyUser Name="Foo" ApiKey="1234567890abcdefghijklm">
<Roles>
<Role>ApiReader</Role>
<Role>ApiWriter</Role>
</Roles>
</ApiKeyUser>
</ApiKeyUsers>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.