private static bool?GetOutOfProcessSettingFromSessionStore(AcuminatorVSPackage package) { const bool defaultOutOfProcessValue = true; const string settingsStoreOutOfProcessValuePath = @"Roslyn\Internal\OnOff\Features"; const string OutOfProcessPropertyName = "OOP64Bit"; var shellSettingsManager = new ShellSettingsManager(package); SettingsStore settingsStore = shellSettingsManager.GetReadOnlySettingsStore(SettingsScope.UserSettings); if (settingsStore == null) { return(null); } else if (!settingsStore.CollectionExists(settingsStoreOutOfProcessValuePath)) { return(defaultOutOfProcessValue); } var propertyNames = settingsStore.GetPropertyNames(settingsStoreOutOfProcessValuePath); if (!propertyNames.Contains(OutOfProcessPropertyName)) { return(defaultOutOfProcessValue); } int?outOfProcessValue = settingsStore.GetInt32(settingsStoreOutOfProcessValuePath, OutOfProcessPropertyName) as int?; return(outOfProcessValue.HasValue ? outOfProcessValue == 1 : defaultOutOfProcessValue); }
public ServerParameters() { SettingsManager settingsManager = new ShellSettingsManager(VMSTPSettingsStore.ServiceProvider); SettingsStore configurationSettingsStore = settingsManager.GetReadOnlySettingsStore(SettingsScope.UserSettings); if (configurationSettingsStore.CollectionExists(VMSTPSettingsStore.Collection)) { disableESMTP = configurationSettingsStore.GetBoolean(VMSTPSettingsStore.Collection, "DisableESMTP", DisableESMTP); port = configurationSettingsStore.GetInt32(VMSTPSettingsStore.Collection, "Port", Port); } }
internal static bool TryGetInt(this SettingsStore settingsStore, string collectionName, string propertyName, out int value) { if (settingsStore.CollectionExists(collectionName)) { value = settingsStore.GetInt32(collectionName, propertyName); return(true); } value = default; return(false); }
private static int?GetIntegerOption(SettingsStore store, string catelogName, string optionName) { if (store == null || !store.CollectionExists(COLLECTION_PATH) || !store.PropertyExists(COLLECTION_PATH, CombineCatelogAndOptionName(catelogName, optionName))) { return(null); } return(store.GetInt32(COLLECTION_PATH, CombineCatelogAndOptionName(catelogName, optionName))); }
private void SetSelection() { try { SettingsStore store = _settings.GetReadOnlySettingsStore(SettingsScope.UserSettings); int index = store.GetInt32(Vsix.Name, "type", 0); cbType.SelectedIndex = index; } catch (Exception ex) { System.Diagnostics.Debug.Write(ex); } }
public static Int32 GetQuickRefFontSize() { try { ThreadHelper.ThrowIfNotOnUIThread(); return(SettingsStore.GetInt32(CollectionName, QuickRefFontSizePropertyName, DefaultQuickRefFontSize)); } catch (ArgumentException) { return(DefaultQuickRefFontSize); } }
private void SetSelection() { try { SettingsStore store = _settings.GetReadOnlySettingsStore(SettingsScope.UserSettings); int index = store.GetInt32(Vsix.Name, "type", 0); cbType.SelectedIndex = index; } catch (Exception ex) { Logger.Log(ex); } }
public int GetInt([ComAliasName("OLE.LPCOLESTR")] string collectionPath, [ComAliasName("OLE.LPCOLESTR")] string propertyName, out int value) { value = inner.GetInt32(collectionPath, propertyName); return(0); }