Exemple #1
0
    //Protobuffer从MemoryStream进行反序列化
    public bool FromMemoryStream(MemoryStream protoMS)
    {
        OneVSOneRpcActMessageNotify pb = ProtoBuf.Serializer.Deserialize <OneVSOneRpcActMessageNotify>(protoMS);

        FromPB(pb);
        return(true);
    }
Exemple #2
0
 //从Protobuffer类型初始化
 public void FromPB(OneVSOneRpcActMessageNotify v)
 {
     if (v == null)
     {
         return;
     }
     m_UserId   = v.UserId;
     m_PlanName = v.PlanName;
 }
Exemple #3
0
    //转化成Protobuffer类型函数
    public OneVSOneRpcActMessageNotify ToPB()
    {
        OneVSOneRpcActMessageNotify v = new OneVSOneRpcActMessageNotify();

        v.UserId   = m_UserId;
        v.PlanName = m_PlanName;

        return(v);
    }