Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs =================================================================== diff -u -ra633912c0e5c538b2a0849eea7c1ab4957aaadeb -r3c17d0ec1a154f1c5a19601fd8885366a01b2daa --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision a633912c0e5c538b2a0849eea7c1ab4957aaadeb) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision 3c17d0ec1a154f1c5a19601fd8885366a01b2daa) @@ -65,34 +65,22 @@ this.referenceLine = referenceLine; } - public override bool Import() + protected override bool OnImport() { ReadResult importDikeProfilesResult = ReadProfileLocations(); - if (importDikeProfilesResult.CriticalErrorOccurred) + if (importDikeProfilesResult.CriticalErrorOccurred || Canceled) { return false; } - if (Canceled) - { - HandleUserCancellingImport(); - return false; - } - string folderPath = Path.GetDirectoryName(FilePath); string[] acceptedIds = importDikeProfilesResult.ImportedItems.Select(dp => dp.Id).ToArray(); ReadResult importDikeProfileDataResult = ReadDikeProfileData(folderPath, acceptedIds); - if (importDikeProfileDataResult.CriticalErrorOccurred) + if (importDikeProfileDataResult.CriticalErrorOccurred || Canceled) { return false; } - if (Canceled) - { - HandleUserCancellingImport(); - return false; - } - CreateProfiles(importDikeProfilesResult, importDikeProfileDataResult); return true; @@ -137,14 +125,6 @@ } /// - /// Act upon the user cancelling the import operation. - /// - protected virtual void HandleUserCancellingImport() - { - Canceled = false; - } - - /// /// Validate the consistency of a object. /// /// The to validate.