theRainbird/CoreRemoting

Lists are returning duplicated values when using the BsonSerializer

clopez30 opened this issue · 0 comments

When returning Lists using the BsonSerializer, all values in the list get duplicated in the client. So the size of the list is exactly twice the list returned from the server.

How to reproduce it

  • Just define a method returning a List in the shared contract.
  • Return some dummy data in the server.
  • Use the default serializer (Bson).
  • Check the list in the client: The list size is twice the size returned in the server. All items get duplicated.

Expected behavior
The list received in the client has exactly the same content that is returned in the server

Additional notes

  • This behaviour occurs when using the BsonSerializer.
  • The BinarySerializer is throwing a timeout exception when returning Lists of classes. For simple types (like string or int) this is working fine (no duplicates).
  • Arrays are working fine with either serializer.