Closed Rune580 closed 3 months ago
Each field gets a generated name like '
k__BackingField': .
I'm not sure where these backing fields come from.
Could it be that you had the members in MediaPlayer2Properties
declared as properties instead of fields?
well this is embarrassing, this seems to be entirely my own fault. closing. sorry about that :/
When a class is attributed with
Dictionary
the properties get incorrectly generated names whenGetAll
is called, for exampleEach field gets a generated name like
'<CanQuit>k__BackingField': <false>
. the full dump of the return is as followRemoving the
Dictionary
attribute, and modifying theGetAll
method to returnIDictionary<string, object>
instead provides the correct names.I assume this wasn't ever caught before due to the sort of niche use case. But the workaround is required in order to be in spec for
org.mpris.MediaPlayer2
, I was struggling to get my service recognized without the workaround.