//Protobuffer从MemoryStream进行反序列化 public bool FromMemoryStream(MemoryStream protoMS) { SkillRpcChangeShortcutReply pb = ProtoBuf.Serializer.Deserialize <SkillRpcChangeShortcutReply>(protoMS); FromPB(pb); return(true); }
//从Protobuffer类型初始化 public void FromPB(SkillRpcChangeShortcutReply v) { if (v == null) { return; } m_Result = v.Result; m_SkillId = v.SkillId; m_Pos = v.Pos; m_Id = v.Id; }
//转化成Protobuffer类型函数 public SkillRpcChangeShortcutReply ToPB() { SkillRpcChangeShortcutReply v = new SkillRpcChangeShortcutReply(); v.Result = m_Result; v.SkillId = m_SkillId; v.Pos = m_Pos; v.Id = m_Id; return(v); }