summaryrefslogtreecommitdiffstats
path: root/mono/DBusType/Array.cs
diff options
context:
space:
mode:
authorJoe Shaw <joeshaw@novell.com>2005-01-11 19:59:06 +0000
committerJoe Shaw <joeshaw@novell.com>2005-01-11 19:59:06 +0000
commitb3ba709079bb0fe1cc2a1afdfe25dc227a223972 (patch)
tree40f64981094d217607489deeba57785b671ace4a /mono/DBusType/Array.cs
parentac4d2cb4642cfb2f56b260b1892d092022efc257 (diff)
2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Tambet Ingo <tambet@ximian.com> * mono/DBusType/Array.cs (Get): Get the underlying element type by calling type.GetElementType(). The code previously depended on broken Mono behavior, which was fixed in Mono 1.1.3. * mono/DBusType/Dict.cs (constructor): Fix the parameters for Activator.CreateInstance() so that the class's constructor is called with the right parameters.
Diffstat (limited to 'mono/DBusType/Array.cs')
-rw-r--r--mono/DBusType/Array.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/mono/DBusType/Array.cs b/mono/DBusType/Array.cs
index bf41763c..dd93a5cc 100644
--- a/mono/DBusType/Array.cs
+++ b/mono/DBusType/Array.cs
@@ -106,6 +106,9 @@ namespace DBus.DBusType
public object Get(System.Type type)
{
+ if (type.IsArray)
+ type = type.GetElementType ();
+
if (Arguments.Suits(elementType, type.UnderlyingSystemType)) {
this.val = System.Array.CreateInstance(type.UnderlyingSystemType, elements.Count);
int i = 0;