public StorageLocation?GetSettingLocation(string key) { StorageLocation?result = null; lockSlim.EnterReadLock(); try { if (localStore.Status == SettingsStoreStatus.Ready && localStore.Contains(key)) { result = StorageLocation.Local; } else if (localStore != roamingStore && roamingStore.Status == SettingsStoreStatus.Ready && roamingStore.Contains(key)) { result = StorageLocation.Roaming; } else if (transientStore.Status == SettingsStoreStatus.Ready && transientStore.Contains(key)) { result = StorageLocation.Transient; } } finally { lockSlim.ExitReadLock(); } return(result); }
public void LoadValues(ISettingsStore store) { if (store.Contains("Profiles")) { _profiles = store.Get("Profiles", new List <BuildProfile>()); } }
public void LoadValues(ISettingsStore store) { if (store.Contains("Environments")) { _environments = (EnvironmentCollection)store.Get(typeof(EnvironmentCollection), "Environments") ?? new EnvironmentCollection(); } }
public void LoadValues(ISettingsStore store) { if (!store.Contains("Associations")) { return; } var associations = store.Get("Associations", new FileAssociations()); AssociateExtensionHandlers(associations.Where(x => x.Value).Select(x => x.Key)); }
public void LoadValues(ISettingsStore store) { _registeredHotkeys.Clear(); if (store.Contains("Bindings")) { var bindings = store.Get("Bindings", new HotkeyBindings()); foreach (var val in _hotkeys.Keys) { var hk = bindings.ContainsKey(val) && bindings[val] != null ? bindings[val] : _hotkeys[val].DefaultHotkey; if (hk != null && !_registeredHotkeys.ContainsKey(hk)) { _registeredHotkeys.Add(hk, _hotkeys[val]); } } } }