Ensure enabled = true by default; cleanup
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Thu, 4 Jan 2007 12:10:20 +0000 (12:10 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Thu, 4 Jan 2007 12:10:20 +0000 (12:10 -0000)
svn path=/trunk/mcs/; revision=70463

mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
mcs/class/System.Web/System.Web.Configuration_2.0/ProfileSection.cs

index ebac84133ff89fdb21ab366f18b746d9064d1ae3..4a814b8277583ca214cbe7234e4271ef726095c7 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-04  Konstantin Triger <kostat@mainsoft.com>
+
+       * ProfileSection.cs: Ensure enabled = true by default; cleanup.
+
 2006-12-27  Vladimir Krasnov  <vladimirk@mainsoft.com>
 
        * CustomErrorCollection.cs: fixed ThrowOnDuplicate to false as in .net
index de41351cf5d8a8ad69cdb1dd38cb504b34f6a3e3..11a70fbb7b0f12136ee2317178685f4536ab84de 100644 (file)
@@ -37,81 +37,44 @@ namespace System.Web.Configuration
 {
        public sealed class ProfileSection: ConfigurationSection
        {
-               static ConfigurationPropertyCollection properties;
-               static ConfigurationProperty autoSaveEnabledProp;
-               static ConfigurationProperty defaultProviderProp;
-               static ConfigurationProperty enabledProp;
-               static ConfigurationProperty inheritsProp;
-               static ConfigurationProperty propertySettingsProp;
-               static ConfigurationProperty providersProp;
-
-               static ProfileSection ()
-               {
-                       autoSaveEnabledProp = new ConfigurationProperty ("automaticSaveEnabled", typeof (bool), true);
-                       defaultProviderProp = new ConfigurationProperty ("defaultProvider", typeof (string), "AspNetSqlProfileProvider");
-                       inheritsProp = new ConfigurationProperty ("inherits", typeof (string), "");
-                       propertySettingsProp = new ConfigurationProperty ("properties", typeof (RootProfilePropertySettingsCollection), null);
-                       providersProp = new ConfigurationProperty ("providers", typeof (ProviderSettingsCollection), null);
-                       enabledProp = new ConfigurationProperty ("enabled", typeof (bool), false);
-
-                       properties = new ConfigurationPropertyCollection ();
-                       properties.Add (autoSaveEnabledProp);
-                       properties.Add (defaultProviderProp);
-                       properties.Add (inheritsProp);
-                       properties.Add (propertySettingsProp);
-                       properties.Add (providersProp);
-                       properties.Add (enabledProp);
-               }
-
-               public ProfileSection ()
-               {
-               }
-
                [ConfigurationProperty ("automaticSaveEnabled", DefaultValue = true)]
-               public bool AutomaticSaveEnabled {
-                       get { return (bool) base [autoSaveEnabledProp]; }
-                       set { base [autoSaveEnabledProp] = value; }
+               public bool AutomaticSaveEnabled {\r
+                       get { return (bool) base ["automaticSaveEnabled"]; }\r
+                       set { base ["automaticSaveEnabled"] = value; }
                }
 
                [ConfigurationProperty ("defaultProvider", DefaultValue = "AspNetSqlProfileProvider")]
                [StringValidator (MinLength = 1)]
-               public string DefaultProvider {
-                       get { return (string) base [defaultProviderProp]; }
-                       set { base [defaultProviderProp] = value; }
+               public string DefaultProvider {\r
+                       get { return (string) base ["defaultProvider"]; }\r
+                       set { base ["defaultProvider"] = value; }
                }
 
                [ConfigurationProperty ("enabled", DefaultValue = true)]
-               public bool Enabled {
-                       get { return (bool) base [enabledProp]; }
-                       set { base [enabledProp] = value; }
+               public bool Enabled {\r
+                       get { return (bool) base ["enabled"]; }\r
+                       set { base ["enabled"] = value; }
                }
 
                [ConfigurationProperty ("inherits", DefaultValue = "")]
-               public string Inherits {
-                       get { return (string) base [inheritsProp]; }
-                       set { base [inheritsProp] = value; }
+               public string Inherits {\r
+                       get { return (string) base ["inherits"]; }\r
+                       set { base ["inherits"] = value; }
                }
 
                [ConfigurationProperty ("properties")]
                public RootProfilePropertySettingsCollection PropertySettings {
-                       get {
-                               return (RootProfilePropertySettingsCollection) base[propertySettingsProp];
+                       get {\r
+                               return (RootProfilePropertySettingsCollection) base ["properties"];
                        }
                }
 
                [ConfigurationProperty ("providers")]
                public ProviderSettingsCollection Providers {
-                       get {
-                               return (ProviderSettingsCollection) base[providersProp];
+                       get {\r
+                               return (ProviderSettingsCollection) base ["providers"];
                        }
                }
-
-               protected override ConfigurationPropertyCollection Properties {
-                       get {
-                               return properties;
-                       }
-               }
-
        }
 }