コード例 #1
0
 private void deleteSimulationComparison(ISimulationComparison simulationComparison)
 {
     _applicationController.Close(simulationComparison);
     _workspace.Project.RemoveSimulationComparison(simulationComparison);
     _registrationTask.Unregister(simulationComparison);
     _eventPublisher.PublishEvent(new SimulationComparisonDeletedEvent(_workspace.Project, simulationComparison));
 }
コード例 #2
0
        private IndividualSimulation createAndRun(Func <ISimulationFactory, IndividualSimulation> individualSimulationCreator)
        {
            var individualSimulation = individualSimulationCreator(_simulationFactory);

            try
            {
                _registrationTask.Register(individualSimulation);
                _simulationEngine.Run(individualSimulation);
            }
            finally
            {
                _registrationTask.Unregister(individualSimulation);
            }

            return(individualSimulation);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public void Unregister(IWithId objectToUnregister)
 {
     _registrationTask.Unregister(objectToUnregister);
 }