我们使用protobuf-net(并且爱它!)。我们现在有一个从父级基类派生的protocontract-decorated子类,它不是protocontract装饰的。Protobuf-net包含不可序列化基类的特定成员
我们试图让子类对一些父类的字段进行序列化/反序列化。
public abstract class TableServiceEntity
{
public virtual string PartitionKey { get; set; }
public virtual string RowKey { get; set; }
public DateTime Timestamp { get; set; }
}
[ProtoContract]
public class IndicatorStreamIndex : TableServiceEntity
{
// protomember properties
}
我们如何获得IndicatorStreamIndex来序列化/反序列化PartitionKey,RowKey和Timestamp?
最佳, 迈克
稍后会试几件事... – 2012-02-11 20:00:30
Marc,谢谢!期待你的回复。 – ionwarp 2012-02-11 23:33:40
可以澄清:您使用的是哪个版本的protobuf-net?可用的不同功能,等 – 2012-02-12 14:41:13