Example #1
0
        /// <summary>
        /// Push database changes to disk.
        /// </summary>
        private void UpdateDatabase()
        {
            if ((localTAManager == null) || (localDB == null))
            {
                return;
            }

            if (databaseAccessMutex.WaitOne())
            {
                try
                {
                    localTAManager.UpdateAll(localDB);
                }
                catch (Exception e)
                {
                    Logger.Instance.Log(e);
                }
                finally
                {
                    databaseAccessMutex.ReleaseMutex();
                }
            }
        }