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

        FromPB(pb);
        return(true);
    }
Beispiel #2
0
 //从Protobuffer类型初始化
 public void FromPB(BaseAttrIconOpenInfoV1 v)
 {
     if (v == null)
     {
         return;
     }
     m_IconId = v.IconId;
     m_IsOpen = v.IsOpen;
     m_IsShow = v.IsShow;
     m_IsNew  = v.IsNew;
 }
Beispiel #3
0
    //转化成Protobuffer类型函数
    public BaseAttrIconOpenInfoV1 ToPB()
    {
        BaseAttrIconOpenInfoV1 v = new BaseAttrIconOpenInfoV1();

        v.IconId = m_IconId;
        v.IsOpen = m_IsOpen;
        v.IsShow = m_IsShow;
        v.IsNew  = m_IsNew;

        return(v);
    }