예제 #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);
        }
예제 #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);
            }
        }