using Proto buf in WCF

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 23:15   56   0

Step 1: download Protobuf and ref in prj , url :
http://code.google.com/p/protobuf-net/

Step 2: Simply change DataContract -> ProtoContract
DataMember -> Protomember (orderNo)

 
[ProtoContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";
 
        [ProtoMember(1)]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }
 
        [ProtoMember(2)]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }


分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP