I am making a UWP application that utilizes an AppServiceConnection to send data to a COM style application. The AppServiceConnection.SendMessageAsync() takes a type of Windows.Foundation.Collections.ValueSet
The ValueSet class is a collection, similar to a dictionary that stores KeyValuePairs of types <string, object>
I am having trouble adding data to the ValueSet, and every time I attempt to add an object I receive the error: "Data of this type is not supported. (Exception from HRESULT: 0x8007065E)"
research on this error reveals that the object to be added must be of a serializable type, and can implement Windows.Foundation.Collections.IPropertySet which is in of itself a collection interface that seems to store keyvaluepairs.
I would like to know how to make a class that can be added to a ValueSet. Do I have to create a new collection implementing IPropertySet or is there some way to make the class itself serializable and able to be added to the ValueSet?
If I have to implement IPropertySet can anyone point me to decent documentation on how to do this?