Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs
===================================================================
diff -u -r0df4def16c2d4e4cb3be9a65fc94422a602d330c -rf189cc6ae9ce8eee88876ff454af0ed1f2866c68
--- Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (.../SerializableAssessmentSectionCreator.cs) (revision 0df4def16c2d4e4cb3be9a65fc94422a602d330c)
+++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (.../SerializableAssessmentSectionCreator.cs) (revision f189cc6ae9ce8eee88876ff454af0ed1f2866c68)
@@ -20,10 +20,9 @@
// All rights reserved.
using System;
-using System.Collections.Generic;
-using Core.Common.Base.Geometry;
using Ringtoets.AssemblyTool.IO.Model;
-using Ringtoets.Integration.IO.Helpers;
+using Ringtoets.Integration.IO.Assembly;
+using Ringtoets.Integration.IO.Properties;
namespace Ringtoets.Integration.IO.Creators
{
@@ -34,26 +33,22 @@
{
///
/// Creates an instance of
- /// based on its input parameters.
+ /// based on a .
///
- /// The generator to generate an id for the
- /// .
- /// The name of the assessment section.
- /// The geometry of the assessment section.
+ /// The
+ /// to create a for.
/// A .
/// Thrown when any parameter is null.
- public static SerializableAssessmentSection Create(UniqueIdentifierGenerator idGenerator,
- string assessmentSectionName,
- IEnumerable geometry)
+ public static SerializableAssessmentSection Create(ExportableAssessmentSection assessmentSection)
{
- if (idGenerator == null)
+ if (assessmentSection == null)
{
- throw new ArgumentNullException(nameof(idGenerator));
+ throw new ArgumentNullException(nameof(assessmentSection));
}
- return new SerializableAssessmentSection(idGenerator.GetNewId(),
- assessmentSectionName,
- geometry);
+ return new SerializableAssessmentSection($"{Resources.SerializableAssessmentSection_IdPrefix}.{assessmentSection.Id}",
+ assessmentSection.Name,
+ assessmentSection.Geometry);
}
}
}
\ No newline at end of file