Fix SOAP configuration error
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Configuration / TypeElement.cs
index 990f32edb4d773494753b04e1462d228a3c4d3c8..cff0c2ff9012c43d557e9b654692195bc8017fb9 100644 (file)
@@ -30,6 +30,7 @@
 
 using System;
 using System.Configuration;
+using System.ComponentModel;
 
 #if NET_2_0
 
@@ -42,7 +43,8 @@ namespace System.Web.Services.Configuration {
 
                static TypeElement ()
                {
-                       typeProp = new ConfigurationProperty ("type", typeof (Type), null, ConfigurationPropertyOptions.IsKey);
+                       typeProp = new ConfigurationProperty ("type", typeof (Type), null, new TypeTypeConverter(),
+                                                                                                 null, ConfigurationPropertyOptions.IsKey);
                        properties = new ConfigurationPropertyCollection ();
 
                        properties.Add (typeProp);
@@ -51,9 +53,12 @@ namespace System.Web.Services.Configuration {
 
                public TypeElement (Type type)
                {
+                       this.Type = type;
                }
 
+               [MonoTODO]
                public TypeElement (string type)
+                       : this (Type.GetType (type))
                {
                }
 
@@ -61,9 +66,7 @@ namespace System.Web.Services.Configuration {
                {
                }
 
-#if notyet
-               [TypeConverter (typeof (TypeAndNameConverter))]
-#endif
+               [TypeConverter (typeof (TypeTypeConverter))]
                [ConfigurationProperty ("type", Options = ConfigurationPropertyOptions.IsKey)]
                public Type Type {
                        get { return (Type) base [typeProp];}