public GetParameterAsBool ( string component, string parameter ) : bool | ||
component | string | The component or section of the config file, used to /// locate the parameter. |
parameter | string | The name of the config parameter. |
Résultat | bool |
public bool GetParameterAsBool(string component, string parameter)
{
bool retVal;
if (!bool.TryParse(GetParameter(component, parameter), out retVal))
{
throw new LoggingException("Component " + component + ", parameter " +
parameter + ", value was unable to be converted to a boolean.");
}
return retVal;
}
Config::GetParameterAsBool ( string component, string parameter, bool defaultValue ) : bool | |
Config::GetParameterAsBool ( string component, string parameter, bool defaultValue ) : bool? |