Index: Application/Riskeer/src/Application.Riskeer/App.xaml.cs
===================================================================
diff -u -r628a729daf3bed1d5cca1d4d0c107afb59134f54 -ra79026549254c82cf85550eb8fea2b7229bf9b1b
--- Application/Riskeer/src/Application.Riskeer/App.xaml.cs (.../App.xaml.cs) (revision 628a729daf3bed1d5cca1d4d0c107afb59134f54)
+++ Application/Riskeer/src/Application.Riskeer/App.xaml.cs (.../App.xaml.cs) (revision a79026549254c82cf85550eb8fea2b7229bf9b1b)
@@ -135,8 +135,10 @@
var mainWindow = new MainWindow();
var projectMigrator = new ProjectMigrator(new DialogBasedInquiryHelper(mainWindow));
+ var assessmentSectionFromFileHandler = new AssessmentSectionFromFileHandler(mainWindow);
+ var projectFactory = new RiskeerProjectFactory(() => assessmentSectionFromFileHandler.GetAssessmentSectionFromFile());
- gui = new GuiCore(mainWindow, new StorageSqLite(), projectMigrator, new RiskeerProjectFactory(), settings)
+ gui = new GuiCore(mainWindow, new StorageSqLite(), projectMigrator, projectFactory, settings)
{
Plugins =
{
Index: Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs
===================================================================
diff -u -r886b86a66f072735567285a3489923186c236c32 -ra79026549254c82cf85550eb8fea2b7229bf9b1b
--- Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision 886b86a66f072735567285a3489923186c236c32)
+++ Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision a79026549254c82cf85550eb8fea2b7229bf9b1b)
@@ -67,7 +67,7 @@
ApplicationIcon = Resources.Riskeer
};
- using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(), guiCoreSettings))
+ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(() => null), guiCoreSettings))
{
// When
gui.Run(targetFilePath);
@@ -110,7 +110,7 @@
ApplicationIcon = Resources.Riskeer
};
- using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(), guiCoreSettings))
+ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(() => null), guiCoreSettings))
{
// When
@@ -144,7 +144,7 @@
var projectMigrator = new ProjectMigrator(inquiryHelper);
- using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(), new GuiCoreSettings()))
+ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, new RiskeerProjectFactory(() => null), new GuiCoreSettings()))
{
// When
gui.Run(sourceFilePath);
Index: Core/Common/src/Core.Common.Base/Data/IProjectFactory.cs
===================================================================
diff -u -rc5f13c0a18ac4de5ad65240eea191a15e1dfd235 -ra79026549254c82cf85550eb8fea2b7229bf9b1b
--- Core/Common/src/Core.Common.Base/Data/IProjectFactory.cs (.../IProjectFactory.cs) (revision c5f13c0a18ac4de5ad65240eea191a15e1dfd235)
+++ Core/Common/src/Core.Common.Base/Data/IProjectFactory.cs (.../IProjectFactory.cs) (revision a79026549254c82cf85550eb8fea2b7229bf9b1b)
@@ -31,11 +31,9 @@
///
/// Creates a new instance of .
///
- /// The func to perform
- /// when the project is created.
/// An empty object.
/// Thrown when something
/// went wrong while creating the object.
- IProject CreateNewProject(Func