diff options
author | Enrico Sada <enrico.sada@gmail.com> | 2012-08-10 03:31:32 +0400 |
---|---|---|
committer | Enrico Sada <enrico.sada@gmail.com> | 2012-08-10 03:42:36 +0400 |
commit | 3331041eea4c782bc0a0a9b6c59077419d742e4c (patch) | |
tree | a5f2c8c85a13e791a7198fa630008e7449cc3cde /mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher | |
parent | 7bc2f969c6100ce8a865cfb39f4a62956c5fde2c (diff) |
add QueryStringConverter String <-> Enum
fix bug https://bugzilla.xamarin.com/show_bug.cgi?id=5230
Diffstat (limited to 'mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher')
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/QueryStringConverter.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/QueryStringConverter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/QueryStringConverter.cs index 6ff1f024d57..09752f05134 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/QueryStringConverter.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/QueryStringConverter.cs @@ -68,6 +68,9 @@ namespace System.ServiceModel.Dispatcher if (!CanConvert (parameterType)) throw new NotSupportedException (String.Format ("Conversion from the argument parameterType '{0}' is not supported", parameterType)); + if (parameterType.IsEnum) + return Enum.Parse(parameterType, parameter, true); + switch (Type.GetTypeCode (parameterType)) { case TypeCode.String: return parameter; |