public GetParameterWithSubstitution ( string component, string parameter, bool tolerant ) : string | ||
component | string | The component or section of the config file, used to /// locate the parameter. |
parameter | string | The name of the config parameter. |
tolerant | bool | If true, this method logs warnings for unmatched environment /// variables. If false, it throws exceptions. |
return | string |
public string GetParameterWithSubstitution(string component, string parameter, bool tolerant)
{
string value = GetParameter(component, parameter);
return ReplaceEnvironmentVariables(value, tolerant);
}
Config::GetParameterWithSubstitution ( string component, string parameter, bool tolerant, string defaultValue ) : string |
/// <summary> /// Populates the descriptor's values from a config file. /// </summary> /// <param name="config">Config to get params from.</param> /// <param name="component">Section of the config XML to look in for db params.</param> /// <param name="decryptionDelegate">Delegate to call to decrypt password fields. /// May be null if passwords are in plain text.</param> public CsvDescriptor(Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate) : this(CsvConnectionType.Unknown, config.GetParameterWithSubstitution(component, "Path", true), null, null, config.ParameterExists(component, "OutputQuoteLevel") ? (CsvQuoteLevel) Enum.Parse(typeof (CsvQuoteLevel),config.GetParameter(component, "OutputQuoteLevel")) : CsvQuoteLevel.QuoteStrings) { }