I had the opportunity to try out the very solid Configuration Section Designer on the weekend, a Visual Studio extension for putting together custom configuration sections quickly and easily. Anyone who has put together their own configuration section using the older IConfigurationSectionHandler
or the newer ConfigurationSection
knows it can take a bit of time and some trial and error. With the CSD extension I had a small but non-trivial custom configuration section up and running in under an hour.
Most of the goodness comes from the easy-to-use graphical designer. Define a section, define some elements, define some collections if you need them, and then pull them all together.
I was able to use inheritance to save myself some repetition with my attributes.
The configuration section is code generated automagically.
A XSD file is also generated for config file intellisense.
Primitive types are covered. Custom enumurations (including Flags
) can be created using the tool itself (code and XSD will be generated), or imported (only XSD will be generated). Any type you like can be imported in the same way.
Finally, using the configuration section is easy thanks to a convenience singleton added to the generated code.
for (int index = 0; index < Settings.Instance.Applications.Count; index++)
AddImageToMenu(Settings.Instance.Applications[index].Image);
I'm very impressed by this extension and I'll definitely be using it again.
There are 0 comments.
Older
Remove Unversioned Files
Newer
Stuff to Try
Older
Remove Unversioned Files
Newer
Stuff to Try
browse with Pivot
Codility Nitrogenium Challenge
OS X Lock
HACT '13
Codility Challenges
Priority Queue
Architecture (13)
ASP.NET (2)
ASP.NET MVC (13)
Brisbane Flood (1)
Building Neno (38)
C# (4)
Challenges (3)
Collections (1)
Communicator (1)
Concurrency Control (2)
Configuration (1)
CSS (5)
DataAnnotations (2)
Database (1)
DotNetOpenAuth (2)
Entity Framework (1)
FluentNHibernate (2)
Inversion of Control (5)
JavaScript (1)
jQuery (4)
Kata (2)
Linq (7)
Markdown (4)
Mercurial (5)
NHibernate (20)
Ninject (2)
OpenID (3)
OS X (1)
Pivot (6)
PowerShell (8)
Prettify (2)
RSS (1)
Spring (3)
SQL Server (5)
T-SQL (2)
Validation (2)
Vim (1)
Visual Studio (2)
Windows Forms (3)
Windows Service (1)
Comments
Leave a Comment
Please register or login to leave a comment.