Index: Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs =================================================================== diff -u -r7618e47c7ff0d09102d56e2c25545f57a4269352 -rdee01f6d6c15af0cc124816bfe99c7658af8995d --- Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision 7618e47c7ff0d09102d56e2c25545f57a4269352) +++ Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision dee01f6d6c15af0cc124816bfe99c7658af8995d) @@ -21,10 +21,13 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using Core.Common.Base; using Core.Common.Base.Data; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; @@ -76,6 +79,27 @@ return Enumerable.Empty(); } + /// + /// Clears the given foreshore profile from a collection. + /// + /// Object type of the structure calculation input. + /// Object type of the structure property of . + /// The calculations. + /// The profile to be cleared. + /// All affected objects by the clear. + public static IEnumerable ClearForeshoreProfile(IEnumerable> calculations, ForeshoreProfile profile) + where TStructureInput : StructuresInputBase, new() + where TStructure : StructureBase + { + var affectedObjects = new Collection(); + foreach (StructuresCalculation calculation in calculations.Where(c => ReferenceEquals(c.InputParameters.ForeshoreProfile, profile))) + { + calculation.InputParameters.ForeshoreProfile = null; + affectedObjects.Add(calculation.InputParameters); + } + return affectedObjects; + } + private static IEnumerable ClearHydraulicBoundaryLocationOutput(HydraulicBoundaryLocation location) { if (!double.IsNaN(location.DesignWaterLevel) ||