Configuration

There are 8 entries for the tag Configuration

ClassFromConfig v1.4.0

I'm happy to announce a new release of ClassFromConfig - v1.4.0! Lots of improvements there. I had to rewrite the code generation code almost from scratch so it is more managable and easy to extend later on. Changes include: Rewritten the code generator engine to be more managable.  Added lost of tests.  Added "options file" support which enables to store ConfigFromClass settings in project .config file.  Added ability to update config file and automaticallt register generated custom sections. Added support for default collections  ...

ClassFromConfig v1.3.1

I have finally migrated ClassFromConfig project to SourceForge.net Now there's version control (Subversion), Issue Tracker, Wiki, Forum and more. So, if you want to contribute to the project - let me know. As for the update - it's a minor release, which includes: ability to load linked config files (via configSource attribute).  node collection can now be any tag (not limited to "<add ...", can use "<item ...", etc.) - must be at least 2 in the config to recognise it as a collection. I've got several enhancements on my to-do list: Ability to create nested classes...

ClassFromConfig v1.3

Better later than never: Happy New Year! And as a New Year gift to you all i'm pleased to announce  a release of ClassFromConfig version 1.3 with support for supports custom sections, e.g if you had <configuration> <ErrorReporter fromAddress="email@domain.com" fromName="Error Reporter" subject="Error: {0}, {1}" floodSubject="Error Flood" enabled="true" ...

ClassFromConfig v1.2

I have updated ClassFromConfig to version 1.2. Now it supports connection strings, e.g if you had <connectionStrings> <add name="MyConnection" connectionString="..."/></connectionStrings> in your config, you could access it as follows: Config.ConnectionStrings.MyConnection Unfortunately there was a problem in previous releases. It was a "works on my machine" syndrome. Doh! Luckily it was discovered, thanks to Gabriel. Anyway, check out ClassFromConfig - it'll save you time. Tags: .NET, C#, Open Source, Configuration, Tools

ClassFromConfig v1.1.1

An update to my previous post: I have updated ClassFromConfig to automatically recognise value types. Types that it can recognise: Boolean Integer Double DateTime String array (String[]) I'm planning to add generation of connection string properties, e.g if you had <connectionStrings> <add name="MyConnection" connectionString="..."/></connectionStrings> in your config, you could access it as follows: Config.ConnectionStrings.MyConnection Tags: .NET, C#, Open Source, Configuration, Tools

Generate Class From Config for C#

.NET configuration is great. But i don't really like working with ConfigurationManager.AppSettings, because i get annoyed: that i have to remember key names that i may accidentally make typos in the key names, and then spend time looking for it. I'd rather have a class with all my configuration items presented as properties, so i can enjoy intellisence when reading my app settings. There are two options here: Write a simple wrapper class that reads app settings and provides access to those via properties Write a custom configuration provider with would...

.NET 2.0 Configuration

Came across this great article that shows some useful things that you can use when writing a custom configuration classes. Things i found useful: Has good examples Lists all validators that are available in .NET 2.0 (e.g. RegexStringValidator) Lists type converters (e.g. CommaDelimitedStringCollectionConverter) Performance optimisation tips Custom configuration proved to be every useful indeed. Writing custom configuration classes might look a bit over the top at first, but it's actually very quick and easy. Another useful resource is here Tags: .NET, Configuration

Nini

Came across Nini - .NET configuration library. Might find it useful as some stage. Tags: .NET, Configuration, Tools