From 113680c63e812fb614b4fc747b99da4db5f70b2f Mon Sep 17 00:00:00 2001 From: Robert McIntosh <261477+rwmcintosh@users.noreply.github.com> Date: Tue, 23 May 2023 12:21:51 -0400 Subject: [PATCH] update core --- .../PKSim.Assets.Images.csproj | 4 ++-- src/PKSim.Assets/PKSim.Assets.csproj | 4 ++-- src/PKSim.BatchTool/PKSim.BatchTool.csproj | 4 ++-- src/PKSim.CLI.Core/PKSim.CLI.Core.csproj | 4 ++-- src/PKSim.CLI/PKSim.CLI.csproj | 6 +++--- .../Model/PKSimSpatialStructureFactory.cs | 5 +++-- src/PKSim.Core/PKSim.Core.csproj | 8 ++++---- .../Services/EventBuildingBlockCreator.cs | 3 ++- .../Services/MoleculesAndReactionsCreator.cs | 5 +++-- .../Services/PKSimInitialConditionsCreator.cs | 2 +- .../Services/PKSimParameterValuesCreator.cs | 3 ++- .../Services/SimulationConfigurationTask.cs | 1 + .../ORM/Queries/ModelObserverQuery.cs | 3 ++- .../ORM/Queries/ModelPassiveTransportQuery.cs | 3 ++- .../PKSim.Infrastructure.csproj | 18 +++++++++--------- src/PKSim.Matlab/PKSim.Matlab.csproj | 4 ++-- .../PKSim.Presentation.csproj | 6 +++--- src/PKSim.R/PKSim.R.csproj | 4 ++-- src/PKSim.UI.Starter/PKSim.UI.Starter.csproj | 8 ++++---- src/PKSim.UI/PKSim.UI.csproj | 8 ++++---- src/PKSim/PKSim.csproj | 6 +++--- .../PKSim.Matlab.Tests.csproj | 4 ++-- tests/PKSim.R.Tests/PKSim.R.Tests.csproj | 4 ++-- tests/PKSim.Tests/PKSim.Tests.csproj | 2 +- tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj | 6 +++--- 25 files changed, 66 insertions(+), 59 deletions(-) diff --git a/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj b/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj index d72f4ba2f..e6560eed2 100644 --- a/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj +++ b/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/src/PKSim.Assets/PKSim.Assets.csproj b/src/PKSim.Assets/PKSim.Assets.csproj index 98f487b54..a026b52cc 100644 --- a/src/PKSim.Assets/PKSim.Assets.csproj +++ b/src/PKSim.Assets/PKSim.Assets.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/src/PKSim.BatchTool/PKSim.BatchTool.csproj b/src/PKSim.BatchTool/PKSim.BatchTool.csproj index ab8dca212..833ff5b0a 100644 --- a/src/PKSim.BatchTool/PKSim.BatchTool.csproj +++ b/src/PKSim.BatchTool/PKSim.BatchTool.csproj @@ -59,8 +59,8 @@ - - + + diff --git a/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj b/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj index 227e9142c..712061a4f 100644 --- a/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj +++ b/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj @@ -27,9 +27,9 @@ - + - + diff --git a/src/PKSim.CLI/PKSim.CLI.csproj b/src/PKSim.CLI/PKSim.CLI.csproj index b99e89137..fbd93cdb9 100644 --- a/src/PKSim.CLI/PKSim.CLI.csproj +++ b/src/PKSim.CLI/PKSim.CLI.csproj @@ -61,9 +61,9 @@ - - - + + + diff --git a/src/PKSim.Core/Model/PKSimSpatialStructureFactory.cs b/src/PKSim.Core/Model/PKSimSpatialStructureFactory.cs index 2656b3d14..a957a1b6c 100644 --- a/src/PKSim.Core/Model/PKSimSpatialStructureFactory.cs +++ b/src/PKSim.Core/Model/PKSimSpatialStructureFactory.cs @@ -1,4 +1,5 @@ using System.Linq; +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Core.Domain.Formulas; @@ -49,7 +50,7 @@ public PKSimSpatialStructureFactory( public SpatialStructure CreateFor(Individual individual, Simulation simulation) { - var spatialStructure = Create().WithName(simulation.Name); + var spatialStructure = Create(); var organism = _objectBaseFactory.Create(); spatialStructure.AddTopContainer(organism); @@ -126,6 +127,6 @@ private void addModelStructureTo(IContainer container, OriginData originData, Mo } } - protected override SpatialStructure CreateSpatialStructure() => _objectBaseFactory.Create(); + protected override SpatialStructure CreateSpatialStructure() => _objectBaseFactory.Create().WithName(DefaultNames.SpatialStructure); } } \ No newline at end of file diff --git a/src/PKSim.Core/PKSim.Core.csproj b/src/PKSim.Core/PKSim.Core.csproj index c2ff38852..29a765d89 100644 --- a/src/PKSim.Core/PKSim.Core.csproj +++ b/src/PKSim.Core/PKSim.Core.csproj @@ -31,10 +31,10 @@ - - - - + + + + diff --git a/src/PKSim.Core/Services/EventBuildingBlockCreator.cs b/src/PKSim.Core/Services/EventBuildingBlockCreator.cs index d7137cbe7..5dd3dcdd2 100644 --- a/src/PKSim.Core/Services/EventBuildingBlockCreator.cs +++ b/src/PKSim.Core/Services/EventBuildingBlockCreator.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Core.Domain.Descriptors; @@ -60,7 +61,7 @@ public EventGroupBuildingBlock CreateFor(Simulation simulation) try { _simulation = simulation; - _eventGroupBuildingBlock = _objectBaseFactory.Create().WithName(simulation.Name); + _eventGroupBuildingBlock = _objectBaseFactory.Create().WithName(DefaultNames.EventBuildingBlock); _cloneManagerForBuildingBlock.FormulaCache = _eventGroupBuildingBlock.FormulaCache; createApplications(_simulation.CompoundPropertiesList); diff --git a/src/PKSim.Core/Services/MoleculesAndReactionsCreator.cs b/src/PKSim.Core/Services/MoleculesAndReactionsCreator.cs index 03e6a6443..338b750f6 100644 --- a/src/PKSim.Core/Services/MoleculesAndReactionsCreator.cs +++ b/src/PKSim.Core/Services/MoleculesAndReactionsCreator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Utility.Extensions; @@ -91,10 +92,10 @@ IInteractionTask interactionTask _passiveTransports = _module.PassiveTransports; _moleculeBuildingBlock = _objectBaseFactory.Create() - .WithName(simulation.Name); + .WithName(DefaultNames.MoleculeBuildingBlock); _reactionBuildingBlock = _objectBaseFactory.Create() - .WithName(simulation.Name); + .WithName(DefaultNames.ReactionBuildingBlock); addIndividualMolecules(simulation.CompoundPropertiesList); diff --git a/src/PKSim.Core/Services/PKSimInitialConditionsCreator.cs b/src/PKSim.Core/Services/PKSimInitialConditionsCreator.cs index 758db9949..82deec1f9 100644 --- a/src/PKSim.Core/Services/PKSimInitialConditionsCreator.cs +++ b/src/PKSim.Core/Services/PKSimInitialConditionsCreator.cs @@ -55,7 +55,7 @@ public InitialConditionsBuildingBlock CreateFor(Module module, Simulation simula allAvailableInitialConditions.Each(msv => msv.IsPresent = true); } - return defaultInitialConditions.WithName(simulation.Name); + return defaultInitialConditions; } private IEnumerable moleculesInvolvedInExpression(Individual individual, IndividualMolecule molecule, diff --git a/src/PKSim.Core/Services/PKSimParameterValuesCreator.cs b/src/PKSim.Core/Services/PKSimParameterValuesCreator.cs index 9ed6ad57b..2ff0a6ff5 100644 --- a/src/PKSim.Core/Services/PKSimParameterValuesCreator.cs +++ b/src/PKSim.Core/Services/PKSimParameterValuesCreator.cs @@ -1,3 +1,4 @@ +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Core.Domain.Services; @@ -40,7 +41,7 @@ public ParameterValuesBuildingBlock CreateFor(Simulation simulation) individual.AllUndefinedMolecules().Each(molecule => updateMoleculeParametersValues(molecule, individual)); updateSimulationParameters(simulation); - return _defaultValues.WithName(simulation.Name); + return _defaultValues.WithName(DefaultNames.ParameterValues); } finally { diff --git a/src/PKSim.Core/Services/SimulationConfigurationTask.cs b/src/PKSim.Core/Services/SimulationConfigurationTask.cs index d26f5f464..7674d32ab 100644 --- a/src/PKSim.Core/Services/SimulationConfigurationTask.cs +++ b/src/PKSim.Core/Services/SimulationConfigurationTask.cs @@ -1,3 +1,4 @@ +using OSPSuite.Assets; using OSPSuite.Core; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; diff --git a/src/PKSim.Infrastructure/ORM/Queries/ModelObserverQuery.cs b/src/PKSim.Infrastructure/ORM/Queries/ModelObserverQuery.cs index f0cbbe3ac..44c1c9826 100644 --- a/src/PKSim.Infrastructure/ORM/Queries/ModelObserverQuery.cs +++ b/src/PKSim.Infrastructure/ORM/Queries/ModelObserverQuery.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Core.Domain.Descriptors; @@ -44,7 +45,7 @@ public ModelObserverQuery( public ObserverBuildingBlock AllObserversFor(MoleculeBuildingBlock moleculeBuildingBlock, Simulation simulation) { - var observerBuildingBlock = _objectBaseFactory.Create().WithName(simulation.Name); + var observerBuildingBlock = _objectBaseFactory.Create().WithName(DefaultNames.ObserverBuildingBlock); addStandardObserversTo(simulation, observerBuildingBlock, moleculeBuildingBlock); addSimulationObservers(simulation, observerBuildingBlock); diff --git a/src/PKSim.Infrastructure/ORM/Queries/ModelPassiveTransportQuery.cs b/src/PKSim.Infrastructure/ORM/Queries/ModelPassiveTransportQuery.cs index f1d321b0b..6d64e9725 100644 --- a/src/PKSim.Infrastructure/ORM/Queries/ModelPassiveTransportQuery.cs +++ b/src/PKSim.Infrastructure/ORM/Queries/ModelPassiveTransportQuery.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using OSPSuite.Assets; using OSPSuite.Core.Domain; using OSPSuite.Core.Domain.Builder; using OSPSuite.Core.Domain.Services; @@ -30,7 +31,7 @@ public ModelPassiveTransportQuery(IObjectBaseFactory objectBaseFactory, public PassiveTransportBuildingBlock AllPassiveTransportsFor(Simulation simulation) { var passiveTransportBuilderCollection = _objectBaseFactory.Create() - .WithName(simulation.Name); + .WithName(DefaultNames.PassiveTransportBuildingBlock); var modelProperties = simulation.ModelProperties; var compoundNames = simulation.AllBuildingBlocks().AllNames().ToList(); diff --git a/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj b/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj index 49a585540..4dd942927 100644 --- a/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj +++ b/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj @@ -41,15 +41,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/PKSim.Matlab/PKSim.Matlab.csproj b/src/PKSim.Matlab/PKSim.Matlab.csproj index c5bbce428..7a23c5a9c 100644 --- a/src/PKSim.Matlab/PKSim.Matlab.csproj +++ b/src/PKSim.Matlab/PKSim.Matlab.csproj @@ -26,9 +26,9 @@ - + - + diff --git a/src/PKSim.Presentation/PKSim.Presentation.csproj b/src/PKSim.Presentation/PKSim.Presentation.csproj index 129668eac..eecbad780 100644 --- a/src/PKSim.Presentation/PKSim.Presentation.csproj +++ b/src/PKSim.Presentation/PKSim.Presentation.csproj @@ -30,11 +30,11 @@ - + - - + + diff --git a/src/PKSim.R/PKSim.R.csproj b/src/PKSim.R/PKSim.R.csproj index 5b5cb75d8..90e80fe15 100644 --- a/src/PKSim.R/PKSim.R.csproj +++ b/src/PKSim.R/PKSim.R.csproj @@ -49,9 +49,9 @@ - + - + diff --git a/src/PKSim.UI.Starter/PKSim.UI.Starter.csproj b/src/PKSim.UI.Starter/PKSim.UI.Starter.csproj index 2cad8e147..818ca014b 100644 --- a/src/PKSim.UI.Starter/PKSim.UI.Starter.csproj +++ b/src/PKSim.UI.Starter/PKSim.UI.Starter.csproj @@ -23,10 +23,10 @@ - - - - + + + + diff --git a/src/PKSim.UI/PKSim.UI.csproj b/src/PKSim.UI/PKSim.UI.csproj index 13f172adb..cfb03f549 100644 --- a/src/PKSim.UI/PKSim.UI.csproj +++ b/src/PKSim.UI/PKSim.UI.csproj @@ -60,14 +60,14 @@ - + - - - + + + diff --git a/src/PKSim/PKSim.csproj b/src/PKSim/PKSim.csproj index 0cda166c5..e389d4b15 100644 --- a/src/PKSim/PKSim.csproj +++ b/src/PKSim/PKSim.csproj @@ -76,14 +76,14 @@ - - + + - + diff --git a/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj b/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj index aa4d17663..bd0a0e53c 100644 --- a/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj +++ b/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj @@ -22,9 +22,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/tests/PKSim.R.Tests/PKSim.R.Tests.csproj b/tests/PKSim.R.Tests/PKSim.R.Tests.csproj index 06c8ff1c3..b7442b768 100644 --- a/tests/PKSim.R.Tests/PKSim.R.Tests.csproj +++ b/tests/PKSim.R.Tests/PKSim.R.Tests.csproj @@ -22,9 +22,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/tests/PKSim.Tests/PKSim.Tests.csproj b/tests/PKSim.Tests/PKSim.Tests.csproj index 70ffe2c89..44de757ff 100644 --- a/tests/PKSim.Tests/PKSim.Tests.csproj +++ b/tests/PKSim.Tests/PKSim.Tests.csproj @@ -21,7 +21,7 @@ - + diff --git a/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj b/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj index f26058975..3ccd4a50b 100644 --- a/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj +++ b/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj @@ -29,10 +29,10 @@ - + - - + +