|
|
We didn't celebrate
Christmas yet, but I know already that one of letters to Santa Claus arrived at
destination.
Indeed, Microsoft has reactivated one of my suggestions that I sent about the System.Configuration namespace and its support of
generics during the Visual Studio Beta program.
But, unfortunately (or fortunately), patience isn't the first virtue of a
rioter decker. So, we have done works on the support of generics in the
System.Configuration namespace.
Our first effort was to develop a generic collection of ConfigurationElement
class : BaseConfigurationElementCollection<ConfigurationElementType>.
This class accelerates the development of the custom collection of
ConfigurationElement class in providing by default thanks to specified
parameter type several strong-typed methods such as Add, Remove, Clear... and
in overriding several methods such as CreateNewElement, GetElementKey... The
step 2 proposed by wozoi in its post titled ".Net 2.0 System.Configuration store parameters - Part II of
IV" is thus more
guided.
During this implementation, we realized that we weren't the only ones to regret
its no support of generics. Indeed, WCF (aka Indigo) developed its own generic
collection of ConfigurationElement class : ServiceModelConfigurationElementCollection. We tried to merge these works in the class which you can download
above.
Others developments can be done rapidly
(ConfigurationManager.GetSection<ConfigurationSectionType>...). You can
still take part in the development of your favorite IDE.
A complete solution (Class library and sample console application) can be
downloaded below :
Download source code.
Anonymous comments are disabled
|
|