merge -r 96531:96532
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / TagPrefixCollection.cs
index 032963c93e0dc84121d4dbebcb3b2f60cf2110fd..c83920f8a5c14fb46a7541db57334dcd0f8c20e2 100644 (file)
@@ -36,8 +36,8 @@ using System.Configuration;
 
 namespace System.Web.Configuration
 {
-       [ConfigurationCollection (typeof (TagPrefixInfo))]
-       public sealed class TagPrefixCollection : ConfigurationElementCollection, ICollection, IEnumerable
+       [ConfigurationCollection (typeof (TagPrefixInfo), CollectionType = ConfigurationElementCollectionType.BasicMap)]
+       public sealed class TagPrefixCollection : ConfigurationElementCollection
        {
                static ConfigurationPropertyCollection properties;
 
@@ -65,15 +65,15 @@ namespace System.Web.Configuration
                        return new TagPrefixInfo ();
                }
 
-               [MonoTODO]
                protected override object GetElementKey (ConfigurationElement element)
                {
-                       return ((TagPrefixInfo)element).TagPrefix;
+                       TagPrefixInfo info = (TagPrefixInfo)element;
+                       return String.Concat (info.TagPrefix, "-", info.TagName, "-", info.Source, "-", info.Namespace, "-", info.Assembly);
                }
 
                public void Remove (TagPrefixInfo tagPrefixInformation)
                {
-                       BaseRemove (tagPrefixInformation.TagPrefix);
+                       BaseRemove (GetElementKey (tagPrefixInformation));
                }
 
                [MonoTODO ("why override this?")]