Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 0b83b90

Browse files
authored
Merge pull request #58 from mogmpoeira/master
Fixing Array Writing
2 parents d2a04f0 + 2b38f93 commit 0b83b90

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Protocol/MessageWriter.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,13 @@ public void Write (object val)
356356
}
357357

358358
Type type = val.GetType ();
359-
360-
WriteVariant (type, val);
359+
360+
// TODO: workaround issue with array being written as variant
361+
// See PR for context: https://github.com/mono/dbus-sharp/pull/58
362+
if (type.IsArray)
363+
Write (type, val);
364+
else
365+
WriteVariant (type, val);
361366
}
362367

363368
public void WriteVariant (Type type, object val)

0 commit comments

Comments
 (0)