【发布时间】:2015-02-11 00:27:09
【问题描述】:
我已经序列化了这个类:
[ProtoContract]
public class TestClass
{
[ProtoMember(1)] public int[] hugeArray;
[ProtoMember(2)] public int x;
[ProtoMember(3)] public int y;
//lot more fields and properties to serialize here...
}
如何在反序列化过程中跳过 [ProtoMember(1)] hugeArray,从而只反序列化 x、y 和其他字段?
我的问题是,有时我很快只需要获取“元数据”,这是其他字段和属性所描述的,但有时我需要整个对象。
【问题讨论】:
标签: serialization protobuf-net