Пример #1
0
 /// <summary>
 /// Invalidate any status information
 /// </summary>
 public void Invalidate()
 {
     // process any status that is marked "IsStatusToClose" to become closed status and set the last update time to now
     if (IsStatusToClose && DateTime.Now >= (m_LastUpdatedTime + m_Status.Delay))
     {
         m_LastUpdatedTime = DateTime.Now;
         m_Status          = TrackerStatus.Closed;
     }
 }
Пример #2
0
        public TrackerEntry(string submitter, string subject, string message)
        {
            m_Submitter = submitter;
            m_Subject   = subject;
            m_Message   = message;

            m_IssueID         = TrackerPersistance.NewIssue;
            m_CreationTime    = DateTime.Now;
            m_LastUpdatedTime = m_CreationTime;

            m_AssignUser = TrackerSystem.FindUser(0);
            m_Status     = TrackerStatus.New;
            m_Priority   = TrackerPriority.None;

            m_Comments = new List <CommentEntry>();

            TrackerPersistance.AddIssue(this);
        }
Пример #3
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);
        }
Пример #4
0
 public void UpdateStatus(TrackerStatus status)
 {
     m_Status          = status;
     m_LastUpdatedTime = DateTime.Now;
 }