public GetParameterAsInt ( string component, string parameter ) : int | ||
component | string | The component or section of the config file, used to /// locate the parameter. |
parameter | string | The name of the config parameter. |
return | int |
public int GetParameterAsInt(string component, string parameter)
{
int retVal;
if (!int.TryParse(GetParameter(component, parameter), out retVal))
{
throw new LoggingException("Component " + component + ", parameter " +
parameter + ", value was unable to be converted to an integer.");
}
return retVal;
}
Config::GetParameterAsInt ( string component, string parameter, int defaultValue ) : int | |
Config::GetParameterAsInt ( string component, string parameter, int defaultValue ) : int? |
public OdpSdeStDescriptor(Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate) : base(config.GetParameter(component, "Server", null), config.GetParameter(component, "User", null), GetDecryptedConfigParameter(config, component, "Password", decryptionDelegate), config.GetParameterAsInt(component, "Connect_Timeout", null)) { }