예제 #1
0
 private void MigrateEsentToDatabaseCallback(EsentPersistentDictionary cacheStore, Action<SanityCheckResult> callback, SanityCheckResult result)
 {
     if (cacheStore != null && _windowManager.Confirm(Resx.Delete, Resx.DeleteEsentConfirmationMessage)) DeleteEsent(cacheStore);
     callback.Invoke(result);
 }
예제 #2
0
        private void CheckDatabaseCallback(bool databaseExisted, Action<SanityCheckResult> callback)
        {
            var result = new SanityCheckResult();
            var frameworkMessage = CheckFrameworkVersion();
            if (frameworkMessage != null) result.UserMessages = new List<NotifyUserMessageEventArgs> { frameworkMessage };
            WorkHandler.Run(RetryFailedUserReports);

            if (!databaseExisted)
            {
                result.DatabaseCreated = true;
                WorkHandler.Run(MigrateEsentToDatabase, cacheStore => MigrateEsentToDatabaseCallback(cacheStore, callback, result));
            }
            else
            {
                callback.Invoke(result);
            }
        }