Exemplo n.º 1
0
        private static void CopyDatabaseSettings()
        {
#pragma warning disable 618 // For migration purposes
            var appData = new AppDataSystemConfigurationProvider();
#pragma warning restore 618
            var appConfig = new AppConfigSystemConfigurationProvider();

            var setting = appData.GetSystemSettings <DatabaseSettings>();
            appConfig.Initialize(setting);
            appData.MarkAsMigrated(setting);
        }
Exemplo n.º 2
0
        private static void CopyOldSystemSettings()
        {
#pragma warning disable 618 // For migration purposes
            var appData = new AppDataSystemConfigurationProvider();
#pragma warning restore 618
            var appConfig = new AppConfigSystemConfigurationProvider();
            foreach (var setting in appData.GetAllSystemSettings().Where(x => x != null))
            {
                appConfig.SaveSettings(setting);
                appData.MarkAsMigrated(setting);
            }
        }