Commit d8c8992b authored by Joe Shaw's avatar Joe Shaw

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.
parent 4612de01
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
......
......@@ -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 + "'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment