public override void UpdateFrom(BuildingBlockMetaData sourceChild, ISession session) { var sourceSimulation = sourceChild as SimulationMetaData; if (sourceSimulation == null) { return; } base.UpdateFrom(sourceChild, session); SimulationMode = sourceSimulation.SimulationMode; BuildingBlocks.UpdateFrom <string, UsedBuildingBlockMetaData>(sourceSimulation.BuildingBlocks, session); updateObservedDataFrom(sourceSimulation.UsedObservedData); //Update results and charts only if simulation is loaded if (!sourceChild.IsLoaded) { return; } updateResultsFrom(sourceSimulation.SimulationResults, session); updateChartsFrom(sourceSimulation.Charts, session); updateSimulationAnalysesFrom(sourceSimulation.SimulationAnalyses, session); }
public virtual void UpdateFrom(ProjectMetaData sourceProject, ISession session) { Name = sourceProject.Name; Description = sourceProject.Description; Version = sourceProject.Version; UpdateContentFrom(sourceProject); BuildingBlocks.UpdateFrom <string, BuildingBlockMetaData>(sourceProject.BuildingBlocks, session); SimulationComparisons.UpdateFrom <string, SimulationComparisonMetaData>(sourceProject.SimulationComparisons, session); ParameterIdentifications.UpdateFrom <string, ParameterIdentificationMetaData>(sourceProject.ParameterIdentifications, session); SensitivityAnalyses.UpdateFrom <string, SensitivityAnalysisMetaData>(sourceProject.SensitivityAnalyses, session); AllObservedData.UpdateFrom <string, ObservedDataMetaData>(sourceProject.AllObservedData, session); }