Merge pull request #1404 from woodsb02/mono-route
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / WebControlsSection.cs
index 261a2dc2213ddc6a3caaa6faacefaa48a823eec6..b3b18050c0c12d58e78364fdcde73b6f069495e4 100644 (file)
 //
 
 using System;
+using System.Collections;
+using System.ComponentModel;
 using System.Configuration;
 
-#if NET_2_0
 
 namespace System.Web.Configuration {
 
@@ -42,16 +43,22 @@ namespace System.Web.Configuration {
 
                static WebControlsSection ()
                {
-                       clientScriptsLocationProp = new ConfigurationProperty ("clientScriptsLocation", typeof (string), "/aspnet_client/{0}/{1}/", ConfigurationPropertyOptions.IsRequired);
+                       clientScriptsLocationProp = new ConfigurationProperty ("clientScriptsLocation", typeof (string), "/aspnet_client/{0}/{1}/",
+                                                                              TypeDescriptor.GetConverter (typeof (string)),
+                                                                              PropertyHelper.NonEmptyStringValidator,
+                                                                              ConfigurationPropertyOptions.IsRequired);
                        properties = new ConfigurationPropertyCollection ();
 
                        properties.Add (clientScriptsLocationProp);
                }
 
-               [MonoTODO]
-               protected override object GetRuntimeObject ()
+               protected internal override object GetRuntimeObject ()
                {
-                       return this;
+                       Hashtable ht = new Hashtable ();
+
+                       ht.Add ("clientScriptsLocation", ClientScriptsLocation);
+
+                       return ht;
                }
 
                [StringValidator (MinLength = 1)]
@@ -60,7 +67,7 @@ namespace System.Web.Configuration {
                        get { return (string) base [clientScriptsLocationProp];}
                }
 
-               protected override ConfigurationPropertyCollection Properties {
+               protected internal override ConfigurationPropertyCollection Properties {
                        get { return properties; }
                }
 
@@ -68,5 +75,4 @@ namespace System.Web.Configuration {
 
 }
 
-#endif