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

        FromPB(pb);
        return(true);
    }
Exemple #2
0
 //从Protobuffer类型初始化
 public void FromPB(TaskRpcAddTaskNotify v)
 {
     if (v == null)
     {
         return;
     }
     m_TaskId    = v.TaskId;
     m_TaskState = v.TaskState;
 }
Exemple #3
0
    //转化成Protobuffer类型函数
    public TaskRpcAddTaskNotify ToPB()
    {
        TaskRpcAddTaskNotify v = new TaskRpcAddTaskNotify();

        v.TaskId    = m_TaskId;
        v.TaskState = m_TaskState;

        return(v);
    }