New test.
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / ProfilePropertySettingsCollection.cs
index 0f1a4bb7976739fa72e2c8c56aa2999341e6e002..8c36fb3d1038d6f6ec191850a3dfd1b9a84ad04e 100644 (file)
@@ -36,20 +36,8 @@ using System.Xml;
 
 namespace System.Web.Configuration
 {
-       [ConfigurationCollection (typeof (ProfilePropertySettings), CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
        public class ProfilePropertySettingsCollection : ConfigurationElementCollection
        {
-               static ConfigurationPropertyCollection properties;
-
-               static ProfilePropertySettingsCollection ()
-               {
-                       properties = new ConfigurationPropertyCollection ();
-               }
-
-               public ProfilePropertySettingsCollection ()
-               {
-               }
-
                public void Add (ProfilePropertySettings propertySettings)
                {
                        BaseAdd (propertySettings);
@@ -60,6 +48,11 @@ namespace System.Web.Configuration
                        BaseClear ();
                }
 
+               public override ConfigurationElementCollectionType CollectionType
+               {
+                       get { return ConfigurationElementCollectionType.AddRemoveClearMap; }
+               }
+               
                protected override ConfigurationElement CreateNewElement ()
                {
                        return new ProfilePropertySettings ();
@@ -94,12 +87,6 @@ namespace System.Web.Configuration
                        return BaseIndexOf (propertySettings);
                }
 
-               [MonoTODO]
-               protected override bool OnDeserializeUnrecognizedElement (string elementName, XmlReader reader)
-               {
-                       throw new NotImplementedException ();
-               }
-
                public void Remove (string name)
                {
                        BaseRemove (name);
@@ -133,30 +120,22 @@ namespace System.Web.Configuration
                        }
                }
 
-               [MonoTODO]
                protected virtual bool AllowClear {
                        get {
-                               throw new NotImplementedException ();
+                               return false;
                        }
                }
 
-               protected override ConfigurationPropertyCollection Properties {
-                       get { return properties; }
-               }
-
                public ProfilePropertySettings this[int index] {
                        get { return Get (index); }
                        set { if (Get (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
                }
 
-               public new ProfilePropertySettings this[string name] {
-                       get { return Get (name); }                              
-               }
-
                protected override bool ThrowOnDuplicate {
-                       get { return false; }
+                       get {
+                               return true;
+                       }
                }
-
        }
 }