/// <summary> /// Returns the value for the specified setting, or the supplied /// default if the setting does not exist /// </summary> public string GetSetting(string key, string defaultValue) { if (!AggregateProperties.TryGetValue(key, out var value)) { value = defaultValue; } return(value); }
/// <summary> /// Returns the value for the specified setting. /// Throws if the setting does not exist. /// </summary> public string GetSetting(string key) { if (!AggregateProperties.TryGetValue(key, out var value)) { var message = string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.ERROR_MissingSetting, key); throw new InvalidOperationException(message); } return(value); }
public IEnumerable <Property> GetAllProperties() { return(AggregateProperties.GetAllProperties()); }
public bool TryGetSetting(string key, out string value) { return(AggregateProperties.TryGetValue(key, out value)); }