Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs
===================================================================
diff -u -r5e2248b589fcb4b39e7ff664cd11a200b08daa28 -r2a28064a44daa277c25e597f4b3eea1edd52e37c
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision 5e2248b589fcb4b39e7ff664cd11a200b08daa28)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision 2a28064a44daa277c25e597f4b3eea1edd52e37c)
@@ -20,6 +20,8 @@
// All rights reserved.
using System;
+using System.Collections.Generic;
+using System.Linq;
using System.Xml.Serialization;
using Core.Common.Base.Geometry;
using Ringtoets.AssemblyTool.IO.Model.Gml;
@@ -44,10 +46,34 @@
/// The unique ID of the assembly.
/// The lower corner of the assembly map boundary.
/// The upper corner of the assembly map boundary.
- /// The collection of that
+ /// The collection of that
/// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
+ /// The collection of that
+ /// belong to the assembly.
/// Thrown when any parameter is null.
- public SerializableAssembly(string id, Point2D lowerCorner, Point2D upperCorner, SerializableFeatureMember[] featureMembers)
+ public SerializableAssembly(string id,
+ Point2D lowerCorner,
+ Point2D upperCorner,
+ IEnumerable assessmentSections,
+ IEnumerable assessmentProcesses,
+ IEnumerable totalAssemblyResults,
+ IEnumerable failureMechanisms,
+ IEnumerable failureMechanismSectionAssemblies,
+ IEnumerable combinedFailureMechanismSectionAssemblies,
+ IEnumerable failureMechanismSectionCollections,
+ IEnumerable failureMechanismSections)
{
if (id == null)
{
@@ -64,14 +90,59 @@
throw new ArgumentNullException(nameof(upperCorner));
}
- if (featureMembers == null)
+ if (assessmentSections == null)
{
- throw new ArgumentNullException(nameof(featureMembers));
+ throw new ArgumentNullException(nameof(assessmentSections));
}
+ if (assessmentProcesses == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentProcesses));
+ }
+
+ if (totalAssemblyResults == null)
+ {
+ throw new ArgumentNullException(nameof(totalAssemblyResults));
+ }
+
+ if (failureMechanisms == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanisms));
+ }
+
+ if (failureMechanismSectionAssemblies == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionAssemblies));
+ }
+
+ if (combinedFailureMechanismSectionAssemblies == null)
+ {
+ throw new ArgumentNullException(nameof(combinedFailureMechanismSectionAssemblies));
+ }
+
+ if (failureMechanismSectionCollections == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionCollections));
+ }
+
+ if (failureMechanismSections == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSections));
+ }
+
Id = id;
Boundary = new SerializableBoundary(lowerCorner, upperCorner);
- FeatureMembers = featureMembers;
+
+ var featureMembers = new List();
+ featureMembers.AddRange(assessmentSections);
+ featureMembers.AddRange(assessmentProcesses);
+ featureMembers.AddRange(totalAssemblyResults);
+ featureMembers.AddRange(failureMechanisms);
+ featureMembers.AddRange(failureMechanismSectionAssemblies);
+ featureMembers.AddRange(combinedFailureMechanismSectionAssemblies);
+ featureMembers.AddRange(failureMechanismSectionCollections);
+ featureMembers.AddRange(failureMechanismSections);
+ FeatureMembers = featureMembers.ToArray();
}
///
@@ -90,14 +161,14 @@
/// Gets or sets the collection of feature members for the assembly.
///
[XmlArray(AssemblyXmlIdentifiers.FeatureMember)]
- [XmlArrayItem(typeof(SerializableAssessmentProcess))]
[XmlArrayItem(typeof(SerializableAssessmentSection))]
+ [XmlArrayItem(typeof(SerializableAssessmentProcess))]
[XmlArrayItem(typeof(SerializableTotalAssemblyResult))]
[XmlArrayItem(typeof(SerializableFailureMechanism))]
[XmlArrayItem(typeof(SerializableFailureMechanismSectionAssembly))]
- [XmlArrayItem(typeof(SerializableFailureMechanismSections))]
- [XmlArrayItem(typeof(SerializableFailureMechanismSection))]
[XmlArrayItem(typeof(SerializableCombinedFailureMechanismSectionAssembly))]
+ [XmlArrayItem(typeof(SerializableFailureMechanismSectionCollection))]
+ [XmlArrayItem(typeof(SerializableFailureMechanismSection))]
public SerializableFeatureMember[] FeatureMembers { get; set; }
}
}
\ No newline at end of file