+2008-02-07 Konstantin Triger <kostat@mainsoft.com>
+
+ * ClientConfigurationSystem.cs: performance: refactor out the Configuration
+ object construction from GetSection() to the ctor.
+
2008-01-16 Zoltan Varga <vargaz@gmail.com>
* ConfigurationElement.cs: Allow non-public constructors. Fixes #353554.
internal class ClientConfigurationSystem : IInternalConfigSystem
{
- object IInternalConfigSystem.GetSection (string configKey)
- {
+ readonly Configuration cfg;
+
+ public ClientConfigurationSystem () {
Assembly a = Assembly.GetEntryAssembly();
string exePath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
if (a == null && exePath == null)
exePath = "";
- Configuration cfg = ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel.None, a, exePath);
+ cfg = ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel.None, a, exePath);
+ }
+
+ object IInternalConfigSystem.GetSection (string configKey)
+ {
if (cfg == null)
return null;