Esempio n. 1
0
        public TrackerEntry(GenericReader reader)
        {
            m_Comments = new List <CommentEntry>();

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_IssueID         = reader.ReadInt();
                m_Submitter       = reader.ReadString();
                m_CreationTime    = reader.ReadDateTime();
                m_LastUpdatedTime = reader.ReadDateTime();

                m_AssignUser = TrackerSystem.FindUser(reader.ReadInt());

                m_Message = reader.ReadString();
                m_Subject = reader.ReadString();

                int count = reader.ReadInt();

                for (int i = 0; i < count; i++)
                {
                    CommentEntry e = new CommentEntry(this, reader);

                    if (m_Comments == null)
                    {
                        m_Comments = new List <CommentEntry>();
                    }

                    m_Comments.Add(e);
                }

                m_Status   = TrackerStatus.Find(reader.ReadInt());
                m_Priority = TrackerPriority.Find(reader.ReadInt());
                break;
            }
            }

            TrackerPersistance.AddIssue(this);
        }