I run my client/server application with protobuf-net instead of binaryformatter and i get next exception: “No serializer defined for type: System.Collections.Queue”.
I am not sure completely and may be the reason is i did something wrong…
because i have already asked about Dictionary/List and these types are supported ( Can I serialize an object (containing members: Dictionary, List… etc) in Mono and deserialize it in MS.NET or vice versa by using protobuf-net? ).
I just read from: http://code.google.com/p/protobuf-net/wiki/GettingStarted
“supported:
any type which implements IEnumerable and has an Add(T) method “
and Queue http://msdn.microsoft.com/en-us/library/system.collections.queue.aspx does not have Add(T)…
Question:
But i want to be sure completely. Does protobuf-net support System.Collections.Queue or not?
At the current time, no: it does not. I would suggest treating the data as a list for the purposes of serialization. For reference,
XmlSerializerhates it too – here’s theXmlSerializeroutput forQueue<string>: