diff options
| author | Joe Shaw <joeshaw@novell.com> | 2004-10-27 22:35:03 +0000 | 
|---|---|---|
| committer | Joe Shaw <joeshaw@novell.com> | 2004-10-27 22:35:03 +0000 | 
| commit | d8c8992b407dd575e4f3d70bb6f7512334e660ca (patch) | |
| tree | ba38b232a194820f98aa5040b1dcc32f9bd15998 | |
| parent | 4612de0198e3417ca710be2bd0c27f4445c6766a (diff) | |
2004-10-27  Joe Shaw  <joeshaw@novell.com>
	* mono/Arguments.cs (GetDBusTypeConstructor):
	type.UnderlyingSystemType will return "System.Byte" if you do it
	on "byte[]", which is not what we want.  So check the type.IsArray
	property and use System.Array instead.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | mono/Arguments.cs | 9 | 
2 files changed, 15 insertions, 1 deletions
| @@ -1,3 +1,10 @@ +2004-10-27  Joe Shaw  <joeshaw@novell.com> + +	* mono/Arguments.cs (GetDBusTypeConstructor): +	type.UnderlyingSystemType will return "System.Byte" if you do it +	on "byte[]", which is not what we want.  So check the type.IsArray +	property and use System.Array instead. +  2004-10-25  John (J5) Palmieri  <johnp@redhat.com>  	* dbus/dbus-sysdeps.c (fill_user_info): On errors do not free diff --git a/mono/Arguments.cs b/mono/Arguments.cs index ca178aea..d78fbff2 100644 --- a/mono/Arguments.cs +++ b/mono/Arguments.cs @@ -161,7 +161,14 @@ namespace DBus      // Get the appropriate constructor for a D-BUS type      public static ConstructorInfo GetDBusTypeConstructor(Type dbusType, Type type)       { -      ConstructorInfo constructor = dbusType.GetConstructor(new Type[] {type.UnderlyingSystemType, typeof(Service)}); +      Type constructorType; + +      if (type.IsArray) +        constructorType = typeof (System.Array); +      else +        constructorType = type.UnderlyingSystemType; + +      ConstructorInfo constructor = dbusType.GetConstructor(new Type[] {constructorType, typeof(Service)});        if (constructor == null)  	throw new ArgumentException("There is no valid constructor for '" + dbusType + "' from type '" + type + "'"); | 
