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

        FromPB(pb);
        return(true);
    }
예제 #2
0
    //转化成Protobuffer类型函数
    public MailRpcDelMailAsk ToPB()
    {
        MailRpcDelMailAsk v = new MailRpcDelMailAsk();

        for (int i = 0; i < (int)m_UidList.Count; i++)
        {
            v.UidList.Add(m_UidList[i]);
        }

        return(v);
    }
예제 #3
0
 //从Protobuffer类型初始化
 public void FromPB(MailRpcDelMailAsk v)
 {
     if (v == null)
     {
         return;
     }
     m_UidList.Clear();
     for (int i = 0; i < v.UidList.Count; i++)
     {
         m_UidList.Add(v.UidList[i]);
     }
 }