Exemplo n.º 1
0
 public Slot(SessionLog parent, long id, SessionLogEntry.TConfiguration sessionInfo)
 {
     m_Id                   = id;
     m_Parent               = parent;
     m_Configuration        = sessionInfo;
     m_State                = SessionLogEntry.TState.Busy;
     m_Exception            = null;
     m_Transferred          = 0;
     m_Speed                = 0.0;
     m_StartTime            = m_Parent.ElapsedSeconds;
     m_LastSpeedCalculation = m_StartTime;
 }
Exemplo n.º 2
0
 public void Stop(Exception e)
 {
     lock (m_Parent.SyncObject)
     {
         if (m_State == SessionLogEntry.TState.Busy)
         {
             m_Speed = CalculateSpeed(m_Transferred, m_StartTime, m_Parent.ElapsedSeconds);
             if (e == null)
             {
                 m_State = SessionLogEntry.TState.Completed;
             }
             else
             {
                 m_State     = SessionLogEntry.TState.Stopped;
                 m_Exception = e;
             }
         }
     }
 }
Exemplo n.º 3
0
 public void Invalidate()
 {
     m_State = SessionLogEntry.TState.Zombie;
 }