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