예제 #1
0
        /// <summary>
        /// This will actually kick off all of the work.
        /// </summary>
        public async Task RunUpdate(RefCountedDeferral refDefferal)
        {
            // If we are a background task report the time
            if (m_baconMan.IsBackgroundTask)
            {
                LastUpdateTime = DateTime.Now;
            }

            // If we are not a background task check message of the day
            if (!m_baconMan.IsBackgroundTask)
            {
                // Sleep for a little while to give the UI some time get work done.
                await Task.Delay(1000);

                // Check for MOTD updates.
                await m_baconMan.MotdMan.CheckForUpdates();

                // Sleep for a little while to give the UI some time get work done.
                await Task.Delay(5000);
            }

            // Ensure everything is ready
            await EnsureBackgroundSetup();

            // Run the image update if needed
            await ImageUpdaterMan.RunUpdate(refDefferal);

            // Run the message update if needed.
            MessageUpdaterMan.RunUpdate(refDefferal);
        }
예제 #2
0
        /// <summary>
        /// This will actually kick off all of the work.
        /// </summary>
        public async Task RunUpdate(RefCountedDeferral refDefferal)
        {
            // If we are a background task report the time
            if (m_baconMan.IsBackgroundTask)
            {
                LastUpdateTime = DateTime.Now;
            }

            // Ensure everything is ready
            await EnsureBackgroundSetup();

            // Run the image update if needed
            await ImageUpdaterMan.RunUpdate(refDefferal);

            // Run the message update if needed.
            MessageUpdaterMan.RunUpdate(refDefferal);
        }