static ApplicationSettingsService() { #if !WINDOWS_PHONE var applicationData = ApplicationData.Current; LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings); RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings); #endif #if !WINDOWS_APP LegacySettingsServiceHandlerStatic = new LegacyApplicationSettingsServiceHandler(); #endif }
static ApplicationSettingsService() { var applicationData = ApplicationData.Current; #if WINDOWS_PHONE if (Version.Parse(Deployment.Current.RuntimeVersion).Major >= 6) { LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings); RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings); } #else LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings); RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings); #endif #if !WINDOWS_APP LegacySettingsServiceHandlerStatic = new LegacyApplicationSettingsServiceHandler(); #endif }