private void deleteSimulationComparison(ISimulationComparison simulationComparison) { _applicationController.Close(simulationComparison); _workspace.Project.RemoveSimulationComparison(simulationComparison); _registrationTask.Unregister(simulationComparison); _eventPublisher.PublishEvent(new SimulationComparisonDeletedEvent(_workspace.Project, simulationComparison)); }
private IndividualSimulation createAndRun(Func <ISimulationFactory, IndividualSimulation> individualSimulationCreator) { var individualSimulation = individualSimulationCreator(_simulationFactory); try { _registrationTask.Register(individualSimulation); _simulationEngine.Run(individualSimulation); } finally { _registrationTask.Unregister(individualSimulation); } return(individualSimulation); }
private void loadObjectBase <T>(T objectToLoad) where T : IObjectBase { using (var progressUpdater = _progressManager.Create()) { progressUpdater.ReportStatusMessage(PKSimConstants.UI.LoadingObject(objectToLoad.Name)); //first unregistered the object to load that might contain dummy objects that should be deleted _registrationTask.Unregister(objectToLoad); //load object content _contentLoader.LoadContentFor(objectToLoad); _registrationTask.Register(objectToLoad); //special loading steps for simulation loadSimulations(objectToLoad as Simulation); } }
public void Unregister(IWithId objectToUnregister) { _registrationTask.Unregister(objectToUnregister); }