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