/* Customized template */ Diário de um Desenvolvedor de Software: XmlSerializerSectionHandler

Diário de um Desenvolvedor de Software

Descobertas, idéias e informações que acontecem no meu trabalho como desenvolvedor de sistemas aplicativos em .NET.

Minha foto
Nome:
Local: Blumenau, SC, Brazil

Sou arquiteto de software e ajudo a definir soluções de tecnologia para necessidades de negócio. Atualmente trabalhando com a plataforma Windows Azure.

quinta-feira, outubro 20, 2005

XmlSerializerSectionHandler

Como adicionar uma seção de configuração no arquivo web.config quando você precisa de uma estrutura mais complexa do que o simples par de nome e valor que é o padrão?

A classe XmlSerializerSectionHandler resolve este problema de uma forma simples e extremamente prática.

XmlSerializerSectionHandler: If you've ever seen the web.config file that ASP.NET uses, and thought, 'Wow, I'm so glad they configure things that way, in this nice, easy-to-use XML file. Wish I could do that!' then you should check out the System.Configuration namespace. There's an interface called IConfigurationSectionHandler that lets you write your own parsers for your application configuration file, letting you put whatever you want in there. I've written a bunch of these over the last few months, but today I wrote the last one I ever will.