Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / TagMapInfo.cs
index b1b22e62cc9fb80335b5681da5ee6322d6b764bc..efdc4941021695b6bd92a235f89545c64c305a83 100644 (file)
@@ -28,9 +28,9 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 
 using System;
+using System.ComponentModel;
 using System.Configuration;
 using System.Xml;
 
@@ -45,23 +45,33 @@ namespace System.Web.Configuration
 
                static TagMapInfo ()
                {
-                       mappedTagTypeProp = new ConfigurationProperty ("mappedTagType", typeof (string));
-                       tagTypeProp = new ConfigurationProperty ("tagType", typeof (string), "", ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
+                       mappedTagTypeProp = new ConfigurationProperty ("mappedTagType", typeof (string), null,
+                                                                      TypeDescriptor.GetConverter (typeof (string)),
+                                                                      PropertyHelper.NonEmptyStringValidator,
+                                                                      ConfigurationPropertyOptions.None);
+                       tagTypeProp = new ConfigurationProperty ("tagType", typeof (string), "",
+                                                                TypeDescriptor.GetConverter (typeof (string)),
+                                                                PropertyHelper.NonEmptyStringValidator,
+                                                                ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
 
                        properties = new ConfigurationPropertyCollection ();
                        properties.Add (mappedTagTypeProp);
                        properties.Add (tagTypeProp);
                }
 
+               internal TagMapInfo ()
+               {
+               }
+               
                public TagMapInfo (string tagTypeName, string mappedTagTypeName)
                {
                        this.TagType = tagTypeName;
                        this.MappedTagType = mappedTagTypeName;
                }
 
-               public override bool Equals (object map)
+               public override bool Equals (object o)
                {
-                       TagMapInfo info = map as TagMapInfo;
+                       TagMapInfo info = o as TagMapInfo;
                        if (info == null)
                                return false;
 
@@ -74,8 +84,7 @@ namespace System.Web.Configuration
                        return MappedTagType.GetHashCode() + TagType.GetHashCode();
                }
 
-               [MonoTODO]
-               protected override bool SerializeElement (XmlWriter writer, bool serializeCollectionKey)
+               protected internal override bool SerializeElement (XmlWriter writer, bool serializeCollectionKey)
                {
                        bool ret = base.SerializeElement (writer, serializeCollectionKey);
 
@@ -98,10 +107,9 @@ namespace System.Web.Configuration
                        set { base[tagTypeProp] = value; }
                }
 
-               protected override ConfigurationPropertyCollection Properties {
+               protected internal override ConfigurationPropertyCollection Properties {
                        get { return properties; }
                }
        }
 }
 
-#endif