Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 991bb2ab authored by Harald Martini's avatar Harald Martini
Browse files

Changed Constructor Parameters to match Method in ISimulatorFactoryFactory

parent 7fc11e1c
No related branches found
No related tags found
No related merge requests found
......@@ -39,13 +39,14 @@ namespace TUGraz.VectoCore.Models.Simulation
{
ISimulatorFactory Factory(
ExecutionMode mode, IInputDataProvider dataProvider,
IOutputDataWriter writer);
IOutputDataWriter writer, bool validate = true);
ISimulatorFactory Factory(ExecutionMode mode,
IInputDataProvider dataProvider,
IOutputDataWriter writer,
IDeclarationReport declarationReport = null,
IVTPReport vtpReport = null,
bool validate = true);
IDeclarationReport declarationReport,
IVTPReport vtpReport,
bool validate = true
);
}
}
......@@ -71,8 +71,18 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
public ISimulatorFactory FollowUpSimulatorFactory
{
get => CreateFollowUpSimulatorFactory ? _followingSimulatorFactoryCreator?.Invoke() : null;
get
{
if (!CreateFollowUpSimulatorFactory)
return null;
Log.Info("Starting next Simulation Step\n");
return _followingSimulatorFactoryCreator?.Invoke();
}
}
public bool CreateFollowUpSimulatorFactory { get; set; } = false;
protected readonly ExecutionMode _mode;
......
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -28,9 +29,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
IOutputDataWriter writer,
IDeclarationReport declarationReport,
IVTPReport vtpReport,
bool validate,
IXMLInputDataReader xmlInputDataReader,
ISimulatorFactoryFactory simulatorFactoryFactory,
bool validate) : base(ExecutionMode.Declaration, writer, validate)
ISimulatorFactoryFactory simulatorFactoryFactory
) : base(ExecutionMode.Declaration, writer, validate)
{
_xmlInputDataReader = xmlInputDataReader;
_simFactoryFactory = simulatorFactoryFactory;
......@@ -38,7 +40,20 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
if (_simulate) {
CreateDeclarationDataReader(dataProvider, declarationReport, vtpReport);
}
}
public SimulatorFactoryDeclaration(IInputDataProvider dataProvider,
IOutputDataWriter writer, IXMLInputDataReader xmlInputDataReader,
ISimulatorFactoryFactory simulatorFactoryFactory, bool validate) : this(
dataProvider: dataProvider,
declarationReport: null,
writer: writer,
vtpReport: null,
validate: true,
xmlInputDataReader: xmlInputDataReader,
simulatorFactoryFactory: simulatorFactoryFactory)
{
}
private bool CanBeSimulated(IInputDataProvider dataProvider)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment