//Protobuffer从MemoryStream进行反序列化 public bool FromMemoryStream(MemoryStream protoMS) { ShopRpcRefreshItemAsk pb = ProtoBuf.Serializer.Deserialize <ShopRpcRefreshItemAsk>(protoMS); FromPB(pb); return(true); }
//从Protobuffer类型初始化 public void FromPB(ShopRpcRefreshItemAsk v) { if (v == null) { return; } m_ShopType = v.ShopType; }
//转化成Protobuffer类型函数 public ShopRpcRefreshItemAsk ToPB() { ShopRpcRefreshItemAsk v = new ShopRpcRefreshItemAsk(); v.ShopType = m_ShopType; return(v); }