C# BarometerBosch missing KnownType Attributes
The BarometerBosch class seems to be missing the KnownType attributes for the sub-types, (including) BarometerBoschFloatDataType.
It gives an exception when streaming (on xamarin):
System.Runtime.Serialization.SerializationException: Type 'MbientLab.MetaWear.Impl.BarometerBosch+BarometerBoschFloatDataType' with data contract name 'BarometerBosch.BarometerBoschFloatDataType:http://schemas.datacontract.org/2004/07/MbientLab.MetaWear.Impl' is not expected.
Looking in the source it seems it is indeed missing: if I clone the repo and add the knowntype attributes is seems to work.
Or am I missing something?
This discussion has been closed.
Comments
Sorry, should be in bug reports...
Huh, odd; the serialization unit tests should have caught that.
https://github.com/mbientlab/MetaWear-SDK-CSharp/blob/1.0.0/MetaWear.Test/MetaWearBoardTest.cs#L31:L34
It's weird that the serialized XML output does display the correct values for the tagged
[DataMember]
variables and even succeeds in that unit test.