public void RegistrySettingsStoreEmptyFallback()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\EmptyFallback", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\EmptyFallback"))
     {
         CommonMethods.EmptyFallback(store);
     }
 }
 public void RegistrySettingsStoreEmptyFallback()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\EmptyFallback", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\EmptyFallback"))
     {
         CommonMethods.EmptyFallback(store);
     }
 }
Ejemplo n.º 3
0
        public void RunRegistry()
        {
            Registry.CurrentUser.OpenSubKey(@"Software\Unclassified", true).DeleteSubKeyTree("SettingsDemo", false);

            ISettingsStore settingsStore = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemo");
            IAppSettings   settings      = SettingsAdapterFactory.New <IAppSettings>(settingsStore);

            AccessSettings(settingsStore, settings);

            settings.SettingsStore.Dispose();
        }
Ejemplo n.º 4
0
        public void RunRegistry()
        {
            Registry.CurrentUser.OpenSubKey(@"Software\Unclassified", true).DeleteSubKeyTree("SettingsDemo", false);

            ISettingsStore settingsStore = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemo");
            IAppSettings settings = SettingsAdapterFactory.New<IAppSettings>(settingsStore);

            AccessSettings(settingsStore, settings);

            settings.SettingsStore.Dispose();
        }
 public void FileSettingsStoreAdapter()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\Adapter", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\Adapter"))
     {
         IAppSettings settings = SettingsAdapterFactory.New <IAppSettings>(store);
         Assert.IsNotNull(settings);
         CommonMethods.AdapterEmptyDefault(settings);
         CommonMethods.AdapterSet(settings);
         CommonMethods.AdapterGetTest(settings);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\Adapter"))
     {
         IAppSettings settings = SettingsAdapterFactory.New <IAppSettings>(store);
         Assert.IsNotNull(settings);
         CommonMethods.AdapterGetTest(settings);
     }
 }
 public void FileSettingsStoreAdapter()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\Adapter", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\Adapter"))
     {
         IAppSettings settings = SettingsAdapterFactory.New<IAppSettings>(store);
         Assert.IsNotNull(settings);
         CommonMethods.AdapterEmptyDefault(settings);
         CommonMethods.AdapterSet(settings);
         CommonMethods.AdapterGetTest(settings);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\Adapter"))
     {
         IAppSettings settings = SettingsAdapterFactory.New<IAppSettings>(store);
         Assert.IsNotNull(settings);
         CommonMethods.AdapterGetTest(settings);
     }
 }
 public void RegistrySettingsStoreSetGet()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\SetGet", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.Set1(store);
         CommonMethods.GetTest1(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.GetTest1(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.Set2(store);
         CommonMethods.GetTest2(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.GetTest2(store);
     }
 }
 public void RegistrySettingsStoreSetGet()
 {
     Registry.CurrentUser.DeleteSubKeyTree(@"Software\Unclassified\SettingsDemoTest\SetGet", false);
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.Set1(store);
         CommonMethods.GetTest1(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.GetTest1(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.Set2(store);
         CommonMethods.GetTest2(store);
     }
     using (var store = new RegistrySettingsStore(false, @"Software\Unclassified\SettingsDemoTest\SetGet"))
     {
         CommonMethods.GetTest2(store);
     }
 }