コード例 #1
0
ファイル: HomeStoreInfo.cs プロジェクト: RBSystems/LoT
        void RefreshDbs(object sender, System.Timers.ElapsedEventArgs e)
        {
            //refresh Dbs in the background
            SafeThread refreshThread = new SafeThread(delegate()
            {
                logger.Log("Homestore refresh was triggered");

                //refresh into this temporary db
                HomeStoreDb tmpStoreDb = new HomeStoreDb(logger);
                tmpStoreDb.Populate();

                //do a switch now
                lock (this)
                {
                    storeDb = tmpStoreDb;
                }

                lastRefreshed = DateTime.Now;
            }, "homestore refresh", logger);

            refreshThread.Start();
        }
コード例 #2
0
        void RefreshDbs(object sender, System.Timers.ElapsedEventArgs e)
        {
            //refresh Dbs in the background
            SafeThread refreshThread = new SafeThread(delegate()
            {
                logger.Log("Homestore refresh was triggered");
                
                //refresh into this temporary db
                HomeStoreDb tmpStoreDb = new HomeStoreDb(logger);
                tmpStoreDb.Populate();

                //do a switch now
                lock (this)
                {
                    storeDb = tmpStoreDb;
                }

                lastRefreshed = DateTime.Now;
            }, "homestore refresh", logger);

            refreshThread.Start();
        }