dbus-sharp
dbus-sharp copied to clipboard
Unable to handle nested dictionaries
While attempting to implement the Protocols
property from the org.freedesktop.Telepathy.ConnectionManager interface, I ran into the fact that IDictionary<string, IDictionary<string, Parameter>>
results in a System.ArgumentException: The type of an array must be a single complete type
.
Is this intended, or should the library be capable of handling nested dictionaries?
I got the same issue with the method 'GetSettings()' from 'org.freedesktop.NetworkManager.Settings.Connection'.
Did you find a workaround?
http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Settings.Connection
I randomly replace the method content of Signature.MakeDict(..) :
return MakeArray (MakeDictEntry (keyType, valueType));
by
return MakeDictEntry (keyType, valueType);
And it seems to work, but I can't guarantee that's the right solution. A project developer has to confirm this.
I have the same issue. I have the following connman DBus method:
<method name="GetServices">
<arg name="services" type="a(oa{sv})" direction="out"/>
</method>
With the NDesk implementation, the following worked:
IDictionary<string, IDictionary<string, object>> GetServices();
I made the change that Ummon recommended and everything seems to work now as well. If this isn't the right way to code the interface method, then what would it be?
Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale