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

        FromPB(pb);
        return(true);
    }
Exemple #2
0
 //从Protobuffer类型初始化
 public void FromPB(ActivityStormRpcJoinLevevNotifyNotify v)
 {
     if (v == null)
     {
         return;
     }
     m_UserID   = v.UserID;
     m_NickName = v.NickName;
     m_Type     = v.Type;
 }
Exemple #3
0
    //转化成Protobuffer类型函数
    public ActivityStormRpcJoinLevevNotifyNotify ToPB()
    {
        ActivityStormRpcJoinLevevNotifyNotify v = new ActivityStormRpcJoinLevevNotifyNotify();

        v.UserID   = m_UserID;
        v.NickName = m_NickName;
        v.Type     = m_Type;

        return(v);
    }