svn path=/trunk/mcs/; revision=53502
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / ProfileGroupSettings.cs
index b67d112c26bd719b6e76ce41fa3668fd10f795d8..a67cd29ca1cabb653471c6b5849107cc00ed4836 100644 (file)
@@ -31,6 +31,7 @@
 #if NET_2_0
 
 using System;
+using System.ComponentModel;
 using System.Configuration;
 
 namespace System.Web.Configuration
@@ -43,8 +44,14 @@ namespace System.Web.Configuration
 
                static ProfileGroupSettings ()
                {
-                       nameProp = new ConfigurationProperty ("name", typeof (string), null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
-                       propertySettingsProp = new ConfigurationProperty ("", typeof (ProfilePropertySettingsCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
+                       nameProp = new ConfigurationProperty ("name", typeof (string), null,
+                                                             TypeDescriptor.GetConverter (typeof (string)),
+                                                             new ProfilePropertyNameValidator (),
+                                                             ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
+                       propertySettingsProp = new ConfigurationProperty ("", typeof (ProfilePropertySettingsCollection), null,
+                                                                         null,
+                                                                         PropertyHelper.DefaultValidator,
+                                                                         ConfigurationPropertyOptions.IsDefaultCollection);
 
                        properties = new ConfigurationPropertyCollection ();
                        properties.Add (nameProp);
@@ -71,25 +78,17 @@ namespace System.Web.Configuration
 
                [ConfigurationProperty ("name", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
                public string Name {
-                       get {
-                               return (string)base [nameProp];
-                       }
-                       internal set{
-                               base [nameProp] = value;
-                       }
+                       get { return (string)base [nameProp]; }
+                       internal set{ base [nameProp] = value; }
                }
 
                [ConfigurationProperty ("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
                public ProfilePropertySettingsCollection PropertySettings {
-                       get {
-                               return (ProfilePropertySettingsCollection) base [propertySettingsProp];
-                       }
+                       get { return (ProfilePropertySettingsCollection) base [propertySettingsProp]; }
                }
 
                protected override ConfigurationPropertyCollection Properties {
-                       get {
-                               return properties;
-                       }
+                       get { return properties; }
                }
        }
 }