using System.Linq; using Deltares.Geotechnics; namespace Deltares.DeltaModel { /// /// Cross section of roughness data. /// public class RoughnessCrossSection : RevetmentCrossSection { public RoughnessCrossSection(IHasSurfaceLine surfaceLineProvider) : base(surfaceLineProvider) { Segments.CreateMethod = CreateMethod; } /// /// Parameterless constructor is used in deserialization. /// private RoughnessCrossSection() { Segments.CreateMethod = CreateMethod; } /// /// Copies clones of the to another . /// /// The other to copy this object's values to. public void CopyTo(RoughnessCrossSection other) { other.Segments.Clear(); foreach (var segment in Segments.ToList()) { other.Segments.Add(segment.Clone()); } } private RoughnessSegment CreateMethod() { return new RoughnessSegment(SurfaceLineProvider); } } }