Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/StochasticSoilModelReplaceData.cs =================================================================== diff -u -rbbca25e660e1ebf3d4dce4e9ce6bbd07bf7a12e1 -r5e70f173b3839314912e086b6c1c784b975ee646 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/StochasticSoilModelReplaceData.cs (.../StochasticSoilModelReplaceData.cs) (revision bbca25e660e1ebf3d4dce4e9ce6bbd07bf7a12e1) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/StochasticSoilModelReplaceData.cs (.../StochasticSoilModelReplaceData.cs) (revision 5e70f173b3839314912e086b6c1c784b975ee646) @@ -23,16 +23,17 @@ using System.Collections.Generic; using System.Linq; using log4net; -using Ringtoets.Common.IO.Properties; using Ringtoets.Piping.Data; namespace Ringtoets.Piping.Plugin.FileImporter { /// /// Strategy for replacing the stochastic soil models with the imported stochastic soil models. /// - public class StochasticSoilModelReplaceData : StochasticSoilModelUpdateStrategyBase + public class StochasticSoilModelReplaceData : IStochasticSoilModelUpdateStrategy { + private readonly ILog log = LogManager.GetLogger(typeof(StochasticSoilModelReplaceData)); + /// /// Adds the to the . /// @@ -41,24 +42,15 @@ /// were imported. /// The current collection of . /// An action to be used to notify progress changes. - public override void UpdateModelWithImportedData( - ICollection readStochasticSoilModels, + public void UpdateModelWithImportedData( + IEnumerable readStochasticSoilModels, string sourceFilePath, StochasticSoilModelCollection targetCollection, Action notifyProgress) { - var log = LogManager.GetLogger(typeof(StochasticSoilModelImporter)); - - var stochasticSoilModelCount = readStochasticSoilModels.Count; - var currentIndex = 1; - var modelsToAdd = new List(readStochasticSoilModels.Count); + var modelsToAdd = new List(); foreach (StochasticSoilModel readStochasticSoilModel in readStochasticSoilModels) { - notifyProgress(Resources.Importer_ProgressText_Adding_imported_data_to_DataModel, currentIndex++, stochasticSoilModelCount); - if (!ValidateStochasticSoilModel(readStochasticSoilModel)) - { - continue; - } var stochasticSoilModel = targetCollection.FirstOrDefault(ssm => ssm.Id == readStochasticSoilModel.Id); if (stochasticSoilModel != null) {