Index: Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs
===================================================================
diff -u -rf01270a101fcbc005cffb4ba740c3e5f318d206d -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs (.../ConfigurationReader.cs) (revision f01270a101fcbc005cffb4ba740c3e5f318d206d)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs (.../ConfigurationReader.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -37,11 +37,11 @@
{
///
/// Base class for reading a configuration from XML and creating a collection of corresponding
- /// , possibly containing one or more .
+ /// , typically containing one or more .
///
- /// The type of calculation items read from XML.
- public abstract class ConfigurationReader
- where TCalculationItem : IReadConfigurationItem
+ /// The type of calculation items read from XML.
+ public abstract class ConfigurationReader
+ where TReadCalculation : IReadConfigurationItem
{
private readonly XDocument xmlDocument;
@@ -77,15 +77,15 @@
/// A collection of read .
public IEnumerable Read()
{
- return ParseReadConfigurationItems(xmlDocument.Root?.Elements());
+ return ParseElements(xmlDocument.Root?.Elements());
}
///
/// Parses a read calculation element.
///
/// The read calculation element to parse.
- /// A parsed .
- protected abstract TCalculationItem ParseReadCalculation(XElement calculationElement);
+ /// A parsed .
+ protected abstract TReadCalculation ParseCalculationElement(XElement calculationElement);
///
/// Validates whether a file exists at the provided .
@@ -158,40 +158,40 @@
///
/// The XML document to validate.
/// The file path the XML document is loaded from.
- /// Thrown when the provided XML document does not contain calculation items.
+ /// Thrown when the provided XML document does not contain configuration items.
private static void ValidateNotEmpty(XDocument document, string xmlFilePath)
{
if (!document.Descendants()
.Any(d => d.Name == ConfigurationSchemaIdentifiers.CalculationElement
|| d.Name == ConfigurationSchemaIdentifiers.FolderElement))
{
string message = new FileReaderErrorMessageBuilder(xmlFilePath)
- .Build(Resources.ConfigurationReader_No_calculation_items_found);
+ .Build(Resources.ConfigurationReader_No_configuration_items_found);
throw new CriticalFileReadException(message);
}
}
- private IEnumerable ParseReadConfigurationItems(IEnumerable elements)
+ private IEnumerable ParseElements(IEnumerable elements)
{
foreach (XElement element in elements)
{
if (element.Name == ConfigurationSchemaIdentifiers.CalculationElement)
{
- yield return ParseReadCalculation(element);
+ yield return ParseCalculationElement(element);
}
if (element.Name == ConfigurationSchemaIdentifiers.FolderElement)
{
- yield return ParseReadCalculationGroup(element);
+ yield return ParseFolderElement(element);
}
}
}
- private ReadCalculationGroup ParseReadCalculationGroup(XElement folderElement)
+ private ReadCalculationGroup ParseFolderElement(XElement folderElement)
{
return new ReadCalculationGroup(folderElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute)?.Value,
- ParseReadConfigurationItems(folderElement.Elements()));
+ ParseElements(folderElement.Elements()));
}
}
}
\ No newline at end of file