* PagesConfigurationHandler.cs: Use enum for EnableSessionState.
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / ProfileGroupSettingsCollection.cs
index b136c3f28c363b09021282e91e360ba1a29f74b5..7f5858331ce3d661d4e562e16d4d802f5a9d8e1a 100644 (file)
@@ -35,20 +35,8 @@ using System.Configuration;
 
 namespace System.Web.Configuration
 {
-       [ConfigurationCollection (typeof (ProfileGroupSettings), AddItemName = "group", CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
        public sealed class ProfileGroupSettingsCollection : ConfigurationElementCollection
        {
-               static ConfigurationPropertyCollection properties;
-
-               static ProfileGroupSettingsCollection ()
-               {
-                       properties = new ConfigurationPropertyCollection ();
-               }
-
-               public ProfileGroupSettingsCollection ()
-               {
-               }
-
                public void Add (ProfileGroupSettings group)
                {
                        BaseAdd (group);
@@ -59,6 +47,11 @@ namespace System.Web.Configuration
                        BaseClear ();
                }
 
+               public override ConfigurationElementCollectionType CollectionType
+               {
+                       get { return ConfigurationElementCollectionType.AddRemoveClearMap; }
+               }
+
                protected override ConfigurationElement CreateNewElement ()
                {
                        return new ProfileGroupSettings ();
@@ -76,7 +69,7 @@ namespace System.Web.Configuration
 
                protected override object GetElementKey (ConfigurationElement element)
                {
-                       return ((ProfileGroupSettings)element).Name;
+                       return ((ProfileGroupSettings) element).Name;
                }
 
                public string GetKey (int index)
@@ -89,12 +82,6 @@ namespace System.Web.Configuration
                        return BaseIndexOf (group);
                }
 
-               [MonoTODO]
-               protected override bool IsModified ()
-               {
-                       throw new NotImplementedException ();
-               }
-
                public void Remove (string name)
                {
                        BaseRemove (name);
@@ -105,12 +92,6 @@ namespace System.Web.Configuration
                        BaseRemoveAt (index);
                }
 
-               [MonoTODO]
-               protected override void ResetModified ()
-               {
-                       base.ResetModified ();
-               }
-
                public void Set (ProfileGroupSettings group)
                {
                        ProfileGroupSettings existing = Get (group.Name);
@@ -125,19 +106,6 @@ namespace System.Web.Configuration
                        }
                }
 
-               public string[ ] AllKeys {
-                       get {
-                               string[] keys = new string[Count];
-                               for (int i = 0; i < Count; i ++)
-                                       keys[i] = this[i].Name;
-                               return keys;
-                       }
-               }
-
-               protected override ConfigurationPropertyCollection Properties {
-                       get { return properties; }
-               }
-
                public ProfileGroupSettings this[int index] {
                        get { return Get (index); }
                        set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
@@ -147,6 +115,10 @@ namespace System.Web.Configuration
                        get { return (ProfileGroupSettings) BaseGet (name); }
                }
 
+               internal void ResetInternal (ConfigurationElement parentElement)
+               {
+                       Reset (parentElement);
+               }
        }
 
 }