public string GetString(string collection, string propertyName, string defaultValue) { string value; int hr = _store.GetStringOrDefault(collection, propertyName, defaultValue, out value); return(ErrorHandler.Succeeded(hr) ? value : null); }
private string GetUserSettingsString(string key, string value) { IVsSettingsStore store = ReadOnlyUserSettings; Marshal.ThrowExceptionForHR(store.GetStringOrDefault(key, value, String.Empty, out string result)); return(result); }
public string GetString(string collection, string propertyName, string defaultValue) { return(NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); var hr = _store.GetStringOrDefault(collection, propertyName, defaultValue, out var value); return ErrorHandler.Succeeded(hr) ? value : null; })); }