Scut Modle Entity Protobuf 原型Proto文件

来源:互联网 发布:东芝移动硬盘加密软件 编辑:程序博客网 时间:2024/05/17 10:41
[DataContract]public class ForwardCurve{    [DataMember(Order=1, IsRequired = true)]    public string Commodity { get; set; }    [DataMember(Order = 2, IsRequired = false)]    public IDictionary<string, int> DictValue { get; set; }    [DataMember(Order = 3, IsRequired = false)]    public IList<string> ListValue { get; set; }}



message Pair_String_Int32 {
required string Key = 1;
required int32 Value = 2;   
}
message ForwardCurve {
   required string Commodity = 1;
   repeated Pair_String_Int32 DictValue = 2;
   repeated string ListValue = 3;
}

https://stackoverflow.com/questions/3874024/how-does-protobuf-net-support-for-dictionary-keyvaluepair-works
https://stackoverflow.com/questions/2535804/protobuf-net-backticks-dictionaries-proto-files

原创粉丝点击