Merge pull request #376 from atomia/master
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Configuration / SoapExtensionTypeElement.cs
index ba42331b95fdf1b98b2a8a0ba60a4a9578d99ca1..1816559b8ffad8dc82e26ec3d2b9a7cc4e643142 100644 (file)
@@ -3,8 +3,9 @@
 //
 // Authors:
 //     Chris Toshok (toshok@ximian.com)
+//     Atsushi Enomoto (atsushi@ximian.com)
 //
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2007 Novell, Inc (http://www.novell.com)
 //
 
 //
@@ -31,6 +32,8 @@
 using System;
 using System.Configuration;
 using System.ComponentModel;
+using System.Globalization;
+using System.Security.Permissions;
 
 #if NET_2_0
 
@@ -50,7 +53,8 @@ namespace System.Web.Services.Configuration {
                                                                  new Int32Converter(), new IntegerValidator (0, Int32.MaxValue),
                                                                  ConfigurationPropertyOptions.IsKey);
                        typeProp = new ConfigurationProperty ("type", typeof (Type), null,
-                                                             null, null, ConfigurationPropertyOptions.IsKey);
+                                                             new TypeTypeConverter (),
+                                                             null, ConfigurationPropertyOptions.IsKey);
                        properties = new ConfigurationPropertyCollection ();
 
                        properties.Add (groupProp);
@@ -76,20 +80,20 @@ namespace System.Web.Services.Configuration {
                {
                }
    
-               [ConfigurationProperty ("group", DefaultValue = "Low", Options = ConfigurationPropertyOptions.IsKey)]
+               [ConfigurationProperty ("group", DefaultValue = PriorityGroup.Low, Options = ConfigurationPropertyOptions.IsKey)]
                public PriorityGroup Group {
                        get { return (PriorityGroup) base [groupProp];}
                        set { base[groupProp] = value; }
                }
 
-               [IntegerValidator]
-               [ConfigurationProperty ("priority", DefaultValue = "0", Options = ConfigurationPropertyOptions.IsKey)]
+               [IntegerValidator (MaxValue = int.MaxValue)]
+               [ConfigurationProperty ("priority", DefaultValue = 0, Options = ConfigurationPropertyOptions.IsKey)]
                public int Priority {
                        get { return (int) base [priorityProp];}
                        set { base[priorityProp] = value; }
                }
 
-               [TypeConverter]
+               [TypeConverter (typeof (TypeTypeConverter))]
                [ConfigurationProperty ("type", Options = ConfigurationPropertyOptions.IsKey)]
                public Type Type {
                        get { return (Type) base [typeProp];}
@@ -106,7 +110,6 @@ namespace System.Web.Services.Configuration {
                }
 
        }
-
 }
 
 #endif