Index: Ringtoets.sln
===================================================================
diff -u -r06fad6a560d0846386d5eb9815e8a8661ae79756 -r81e5c8d7de54c994306ed1401ee411ab96d3db9f
--- Ringtoets.sln (.../Ringtoets.sln) (revision 06fad6a560d0846386d5eb9815e8a8661ae79756)
+++ Ringtoets.sln (.../Ringtoets.sln) (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -1947,7 +1947,7 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.Migration", "Ringtoets\Migration\src\Ringtoets.Migration\Riskeer.Migration.csproj", "{AC4F7F48-F674-4E32-AB35-9C726605F684}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.Migration", "Ringtoets\Migration\src\Riskeer.Migration\Riskeer.Migration.csproj", "{AC4F7F48-F674-4E32-AB35-9C726605F684}"
ProjectSection(ProjectDependencies) = postProject
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/Properties/AssemblyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/Properties/Resources.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/Properties/Resources.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/RingtoetsProjectMigrator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/Riskeer.Migration.csproj'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 81e5c8d7de54c994306ed1401ee411ab96d3db9f refers to a dead (removed) revision in file `Ringtoets/Migration/src/Ringtoets.Migration/packages.config'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Migration/src/Riskeer.Migration/Properties/AssemblyInfo.cs
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/Properties/AssemblyInfo.cs (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/Properties/AssemblyInfo.cs (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,25 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Reflection;
+
+[assembly: AssemblyTitle("Riskeer.Migration")]
+[assembly: AssemblyProduct("Riskeer.Migration")]
\ No newline at end of file
Index: Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.Designer.cs
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.Designer.cs (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.Designer.cs (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,202 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Riskeer.Migration.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Riskeer.Migration.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to rtd.
+ ///
+ internal static string RingtoetsProject_FileExtension {
+ get {
+ return ResourceManager.GetString("RingtoetsProject_FileExtension", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ringtoets project.
+ ///
+ internal static string RingtoetsProject_TypeDescription {
+ get {
+ return ResourceManager.GetString("RingtoetsProject_TypeDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het is niet mogelijk om het Ringtoets logbestand '{0}' aan te maken..
+ ///
+ internal static string RingtoetsProjectMigrator_CreateInitializedDatabaseLogFile_Unable_to_create_migration_log_file_0 {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_CreateInitializedDatabaseLogFile_Unable_to_create_migrat" +
+ "ion_log_file_0", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het opruimen van het Ringtoets logbestand '{0}' is mislukt..
+ ///
+ internal static string RingtoetsProjectMigrator_Deleting_migration_log_file_0_failed {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_Deleting_migration_log_file_0_failed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het migreren van het projectbestand '{0}' is geannuleerd..
+ ///
+ internal static string RingtoetsProjectMigrator_GenerateMigrationCancelledLogMessage_Updating_projectfile_0_was_cancelled {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_GenerateMigrationCancelledLogMessage_Updating_projectfil" +
+ "e_0_was_cancelled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het project dat u wilt openen is opgeslagen in het formaat van een eerdere versie van Ringtoets.
+ ///
+ ///Weet u zeker dat u het bestand wilt migreren naar het formaat van uw huidige Ringtoetsversie ({0})?.
+ ///
+ internal static string RingtoetsProjectMigrator_Migrate_Outdated_project_file_update_to_current_version_0_inquire {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_Migrate_Outdated_project_file_update_to_current_version_" +
+ "0_inquire", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het projectbestand '{0}' is succesvol gemigreerd naar '{1}' (versie {2})..
+ ///
+ internal static string RingtoetsProjectMigrator_MigrateToTargetLocation_Outdated_projectfile_0_succesfully_updated_to_target_filepath_1_version_2_ {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_MigrateToTargetLocation_Outdated_projectfile_0_succesful" +
+ "ly_updated_to_target_filepath_1_version_2_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het migreren van het projectbestand '{0}' is mislukt: {1}.
+ ///
+ internal static string RingtoetsProjectMigrator_MigrateToTargetLocation_Updating_outdated_projectfile_0_failed_with_exception_1_ {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_MigrateToTargetLocation_Updating_outdated_projectfile_0_" +
+ "failed_with_exception_1_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Door de migratie is het project aangepast. Bekijk het migratierapport door op details te klikken.
+ ///.
+ ///
+ internal static string RingtoetsProjectMigrator_Project_file_modified_click_details_for_migration_report {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_Project_file_modified_click_details_for_migration_report" +
+ "", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Bron.
+ ///
+ internal static string RingtoetsProjectMigrator_Source_Descriptor {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_Source_Descriptor", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Doel.
+ ///
+ internal static string RingtoetsProjectMigrator_Target_Descriptor {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_Target_Descriptor", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}projectpad moet een geldig projectpad zijn..
+ ///
+ internal static string RingtoetsProjectMigrator_ValidateProjectPath_TypeDescriptor_0_filepath_must_be_a_valid_path {
+ get {
+ return ResourceManager.GetString("RingtoetsProjectMigrator_ValidateProjectPath_TypeDescriptor_0_filepath_must_be_a_" +
+ "valid_path", resourceCulture);
+ }
+ }
+ }
+}
Index: Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.resx
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.resx (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/Properties/Resources.resx (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Het project dat u wilt openen is opgeslagen in het formaat van een eerdere versie van Ringtoets.
+
+Weet u zeker dat u het bestand wilt migreren naar het formaat van uw huidige Ringtoetsversie ({0})?
+
+
+ rtd
+
+
+ Ringtoets project
+
+
+ Het projectbestand '{0}' is succesvol gemigreerd naar '{1}' (versie {2}).
+
+
+ Het migreren van het projectbestand '{0}' is mislukt: {1}
+
+
+ Het migreren van het projectbestand '{0}' is geannuleerd.
+
+
+ {0}projectpad moet een geldig projectpad zijn.
+
+
+ Bron
+
+
+ Doel
+
+
+ Het opruimen van het Ringtoets logbestand '{0}' is mislukt.
+
+
+ Door de migratie is het project aangepast. Bekijk het migratierapport door op details te klikken.
+
+
+
+ Het is niet mogelijk om het Ringtoets logbestand '{0}' aan te maken.
+
+
\ No newline at end of file
Index: Ringtoets/Migration/src/Riskeer.Migration/RingtoetsProjectMigrator.cs
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/RingtoetsProjectMigrator.cs (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/RingtoetsProjectMigrator.cs (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,268 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using Core.Common.Base.Storage;
+using Core.Common.Gui;
+using Core.Common.Util;
+using Core.Common.Util.Settings;
+using log4net;
+using Migration.Scripts.Data.Exceptions;
+using Ringtoets.Common.Util;
+using Riskeer.Migration.Core;
+using Riskeer.Migration.Properties;
+using MigrationCoreStorageResources = Migration.Core.Storage.Properties.Resources;
+
+namespace Riskeer.Migration
+{
+ ///
+ /// A GUI implementation to migrate a Ringtoets database file to a newer version.
+ ///
+ public class RingtoetsProjectMigrator : IMigrateProject
+ {
+ private static readonly string currentDatabaseVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion();
+
+ private readonly ILog log = LogManager.GetLogger(typeof(RingtoetsProjectMigrator));
+ private readonly RingtoetsSqLiteDatabaseFileMigrator fileMigrator;
+ private readonly IInquiryHelper inquiryHelper;
+ private readonly FileFilterGenerator fileFilter;
+
+ private readonly string migrationLogPath;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Object responsible for inquiring the data.
+ public RingtoetsProjectMigrator(IInquiryHelper inquiryHelper)
+ {
+ if (inquiryHelper == null)
+ {
+ throw new ArgumentNullException(nameof(inquiryHelper));
+ }
+
+ migrationLogPath = Path.Combine(SettingsHelper.Instance.GetLocalUserTemporaryDirectory(),
+ "RingtoetsMigrationLog.sqlite");
+
+ this.inquiryHelper = inquiryHelper;
+ fileMigrator = new RingtoetsSqLiteDatabaseFileMigrator
+ {
+ LogPath = migrationLogPath
+ };
+ fileFilter = new FileFilterGenerator(Resources.RingtoetsProject_FileExtension,
+ Resources.RingtoetsProject_TypeDescription);
+ }
+
+ public MigrationRequired ShouldMigrate(string filePath)
+ {
+ if (filePath == null)
+ {
+ throw new ArgumentNullException(nameof(filePath));
+ }
+
+ ValidateProjectPath(filePath, nameof(filePath), Resources.RingtoetsProjectMigrator_Source_Descriptor);
+
+ var versionedFile = new RingtoetsVersionedFile(filePath);
+ string version = versionedFile.GetVersion();
+
+ if (version.Equals(currentDatabaseVersion))
+ {
+ return MigrationRequired.No;
+ }
+
+ if (!fileMigrator.IsVersionSupported(version))
+ {
+ string errorMessage = string.Format(MigrationCoreStorageResources.Migrate_From_Version_0_To_Version_1_Not_Supported,
+ version, currentDatabaseVersion);
+ log.Error(errorMessage);
+ return MigrationRequired.Aborted;
+ }
+
+ string query = string.Format(Resources.RingtoetsProjectMigrator_Migrate_Outdated_project_file_update_to_current_version_0_inquire,
+ currentDatabaseVersion);
+ if (inquiryHelper.InquireContinuation(query))
+ {
+ return MigrationRequired.Yes;
+ }
+
+ GenerateMigrationCancelledLogMessage(filePath);
+ return MigrationRequired.Aborted;
+ }
+
+ public string DetermineMigrationLocation(string originalFilePath)
+ {
+ if (originalFilePath == null)
+ {
+ throw new ArgumentNullException(nameof(originalFilePath));
+ }
+
+ ValidateProjectPath(originalFilePath, nameof(originalFilePath), Resources.RingtoetsProjectMigrator_Source_Descriptor);
+
+ string suggestedFileName = GetSuggestedFileName(originalFilePath);
+ string migrationLocation = inquiryHelper.GetTargetFileLocation(fileFilter.Filter, suggestedFileName);
+ if (migrationLocation == null)
+ {
+ GenerateMigrationCancelledLogMessage(originalFilePath);
+ }
+
+ return migrationLocation;
+ }
+
+ public bool Migrate(string sourceFilePath, string targetFilePath)
+ {
+ if (sourceFilePath == null)
+ {
+ throw new ArgumentNullException(nameof(sourceFilePath));
+ }
+
+ if (targetFilePath == null)
+ {
+ throw new ArgumentNullException(nameof(targetFilePath));
+ }
+
+ ValidateProjectPath(sourceFilePath, nameof(sourceFilePath), Resources.RingtoetsProjectMigrator_Source_Descriptor);
+ ValidateProjectPath(targetFilePath, nameof(targetFilePath), Resources.RingtoetsProjectMigrator_Target_Descriptor);
+
+ return MigrateToTargetLocation(sourceFilePath, targetFilePath);
+ }
+
+ private bool MigrateToTargetLocation(string sourceFilePath, string targetLocation)
+ {
+ if (!CreateInitializedDatabaseLogFile())
+ {
+ return false;
+ }
+
+ try
+ {
+ var versionedFile = new RingtoetsVersionedFile(sourceFilePath);
+ fileMigrator.Migrate(versionedFile, currentDatabaseVersion, targetLocation);
+ string message = string.Format(Resources.RingtoetsProjectMigrator_MigrateToTargetLocation_Outdated_projectfile_0_succesfully_updated_to_target_filepath_1_version_2_,
+ sourceFilePath, targetLocation, currentDatabaseVersion);
+ log.Info(message);
+
+ LogMigrationMessages();
+
+ return true;
+ }
+ catch (CriticalMigrationException e)
+ {
+ string errorMessage = string.Format(Resources.RingtoetsProjectMigrator_MigrateToTargetLocation_Updating_outdated_projectfile_0_failed_with_exception_1_,
+ sourceFilePath, e.Message);
+ log.Error(errorMessage, e);
+ return false;
+ }
+ finally
+ {
+ TryCleanupDatabaseLogFile();
+ }
+ }
+
+ private void LogMigrationMessages()
+ {
+ using (var migrationLogDatabase = new MigrationLogDatabaseReader(migrationLogPath))
+ {
+ ReadOnlyCollection migrationLogMessages = migrationLogDatabase.GetMigrationLogMessages();
+ if (!migrationLogMessages.Any())
+ {
+ return;
+ }
+
+ var migrationLog = new StringBuilder(Resources.RingtoetsProjectMigrator_Project_file_modified_click_details_for_migration_report);
+ foreach (MigrationLogMessage logMessage in migrationLogMessages)
+ {
+ migrationLog.AppendLine(logMessage.Message);
+ }
+
+ log.Info(migrationLog);
+ }
+ }
+
+ private bool CreateInitializedDatabaseLogFile()
+ {
+ try
+ {
+ IOUtils.CreateFileIfNotExists(migrationLogPath);
+ }
+ catch (ArgumentException exception)
+ {
+ log.Error(string.Format(Resources.RingtoetsProjectMigrator_CreateInitializedDatabaseLogFile_Unable_to_create_migration_log_file_0, migrationLogPath),
+ exception);
+ return false;
+ }
+
+ return true;
+ }
+
+ private void TryCleanupDatabaseLogFile()
+ {
+ try
+ {
+ if (File.Exists(migrationLogPath))
+ {
+ File.Delete(migrationLogPath);
+ }
+ }
+ catch (SystemException exception) when (exception is IOException
+ || exception is UnauthorizedAccessException)
+ {
+ string errorMessage = string.Format(Resources.RingtoetsProjectMigrator_Deleting_migration_log_file_0_failed, migrationLogPath);
+ log.Error(errorMessage, exception);
+ }
+ }
+
+ private static string GetSuggestedFileName(string sourceFilePath)
+ {
+ string fileName = Path.GetFileNameWithoutExtension(sourceFilePath);
+ string versionSuffix = currentDatabaseVersion.Replace(".", "-");
+ string suggestedFileName = $"{fileName}_{versionSuffix}";
+
+ return suggestedFileName;
+ }
+
+ private void GenerateMigrationCancelledLogMessage(string sourceFilePath)
+ {
+ string warningMessage = string.Format(Resources.RingtoetsProjectMigrator_GenerateMigrationCancelledLogMessage_Updating_projectfile_0_was_cancelled, sourceFilePath);
+ log.Warn(warningMessage);
+ }
+
+ ///
+ /// Validates a given file path.
+ ///
+ /// The file path to be validated.
+ /// The name of the argument.
+ /// Prefix, describing the type of file path is being validated.
+ /// Thrown when the file path argument with the
+ /// given name is not valid.
+ private static void ValidateProjectPath(string filePath, string argumentName, string pathDescription)
+ {
+ if (!IOUtils.IsValidFilePath(filePath))
+ {
+ string message = string.Format(Resources.RingtoetsProjectMigrator_ValidateProjectPath_TypeDescriptor_0_filepath_must_be_a_valid_path,
+ pathDescription);
+ throw new ArgumentException(message, argumentName);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Migration/src/Riskeer.Migration/Riskeer.Migration.csproj
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/Riskeer.Migration.csproj (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/Riskeer.Migration.csproj (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,80 @@
+
+
+
+ {AC4F7F48-F674-4E32-AB35-9C726605F684}
+ Riskeer.Migration
+ Riskeer.Migration
+
+
+
+
+ ..\..\..\..\packages\log4net.2.0.4\lib\net40-full\log4net.dll
+ True
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ Copying.licenseheader
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+ False
+
+
+ {30e4c2ae-719e-4d70-9fa9-668a9767fbfa}
+ Core.Common.Gui
+ False
+
+
+ {e344867e-9ac9-44c8-88a5-8185681679a9}
+ Core.Common.IO
+ False
+
+
+ {f49bd8b2-332a-4c91-a196-8cce0a2c7d98}
+ Core.Common.Util
+ False
+
+
+ {efd7e662-5b69-4b71-a448-565b64e9c033}
+ Migration.Core.Storage
+ False
+
+
+ {d08db9e2-6861-44c8-a725-71a70274cc77}
+ Migration.Scripts.Data
+ False
+
+
+ {6a074d65-a81c-4c1c-8e24-f36c916e4ed7}
+ Ringtoets.Common.Util
+ False
+
+
+ {fac55b92-e259-43d6-b9a1-5bda6c834359}
+ Riskeer.Migration.Core
+
+
+
\ No newline at end of file
Index: Ringtoets/Migration/src/Riskeer.Migration/packages.config
===================================================================
diff -u
--- Ringtoets/Migration/src/Riskeer.Migration/packages.config (revision 0)
+++ Ringtoets/Migration/src/Riskeer.Migration/packages.config (revision 81e5c8d7de54c994306ed1401ee411ab96d3db9f)
@@ -0,0 +1,25 @@
+
+
+
+
\ No newline at end of file