コード例 #1
0
        public DownloadService(IDataContext dataContext)
        {
            m_DataContext = dataContext;
            m_Collection  = m_DataContext.GetCollection <DownloadFileEntity> ();

            m_Entity = m_Collection.FirstOrDefault();
            if (m_Entity == null)
            {
                m_Entity = new DownloadFileEntity {
                    DownloadingReleases = new List <DownloadReleaseEntity> ()
                };
                m_Collection.Add(m_Entity);
            }
            m_SpeedTimer.Interval = TimeSpan.FromSeconds(1);
            m_SpeedTimer.Tick    += SpeedTimerTick;
        }