private object EvaluateOne(
string[] keys, SectionInput input, bool isTrusted,
FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentResult) {
object result;
try {
ConfigXmlReader reader = GetSectionXmlReader(keys, input);
if (reader == null) {
//
// If section is not found in a file, use the parent result
//
result = UseParentResult(factoryRecord.ConfigKey, parentResult, sectionRecord);
}
else {
result = CallCreateSection(
isTrusted, factoryRecord, sectionRecord, parentResult,
reader, input.SectionXmlInfo.Filename, input.SectionXmlInfo.LineNumber);
}
}
catch (Exception e) {
throw ExceptionUtil.WrapAsConfigException(
SR.GetString(SR.Config_exception_creating_section, factoryRecord.ConfigKey),
e, input.SectionXmlInfo);
}
catch {
throw ExceptionUtil.WrapAsConfigException(
SR.GetString(SR.Config_exception_creating_section, factoryRecord.ConfigKey),
null, input.SectionXmlInfo);
}
return result;
}