2
我想使用的protobuf序列化ConcurrentQueue,但我得到一個例外,當我反序列化對象序列化ConcurrentQueue使用protobuf的
Type is not expected, and no contract can be inferred: System.Collections.Concurrent.ConcurrentQueue`1[[System.Byte[], mscorlib
有沒有解決這個問題的方法嗎?像寫入Protobuf的擴展或繼承和擴展ConcurrentQueue?
爲什麼需要序列化併發隊列?將這些項目出列並使用'List'或數組。反序列化後,您可以重新填充實際的隊列。 –
Lloyd