public static IDimension TryGetDimension(this IDimensionFactory dimensionFactory, string dimensionName) { try { return(dimensionFactory.Dimension(dimensionName)); } catch (KeyNotFoundException) { return(null); } }
public FormulaTask( IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, IAliasCreator aliasCreator, IDimensionFactory dimensionFactory) { _objectPathFactory = objectPathFactory; _objectBaseFactory = objectBaseFactory; _aliasCreator = aliasCreator; _dimensionFactory = dimensionFactory; }
protected ParameterIdentificationChartFeedbackPresenter(IParameterIdentificationChartFeedbackView view, IChartDisplayPresenter chartDisplayPresenter, IDimensionFactory dimensionFactory, IDisplayUnitRetriever displayUnitRetriever, TChart chart) : base(view) { _chartDisplayPresenter = chartDisplayPresenter; _displayUnitRetriever = displayUnitRetriever; _view.AddChartView(chartDisplayPresenter.View); AddSubPresenters(_chartDisplayPresenter); _dimensionFactory = dimensionFactory; _chart = chart; _outputMappingComparer = new OutputMappingByFullOutputPathComparer(); _chartDisplayPresenter.Edit(_chart, new ChartFontAndSizeSettings().ForParameterIdentificationFeedback()); }
public Converter52To531(ISolverSettingsFactory solverSettingsFactory, ISimulationResultsLoader simulationResultsLoader, ICompoundConverter52 compoundConverter, IObjectPathFactory objectPathFactory, IoC container, IDimensionFactory dimensionFactory) { _solverSettingsFactory = solverSettingsFactory; _simulationResultsLoader = simulationResultsLoader; _compoundConverter = compoundConverter; _objectPathFactory = objectPathFactory; _container = container; _dimensionFactory = dimensionFactory; _simulationChartElementCache = new List <XElement>(); }
public DataFactory( IDimensionFactory dimensionFactory, IObjectPathFactory objectPathFactory, IDisplayUnitRetriever displayUnitRetriever, IDataRepositoryTask dataRepositoryTask) { _dimensionFactory = dimensionFactory; _objectPathFactory = objectPathFactory; _displayUnitRetriever = displayUnitRetriever; _dataRepositoryTask = dataRepositoryTask; }
public PKParameterTask( IPKParameterRepository pkParameterRepository, IDimensionTask dimensionTask, IDimensionFactory dimensionFactory, IOSPSuiteLogger logger) { _pkParameterRepository = pkParameterRepository; _dimensionTask = dimensionTask; _dimensionFactory = dimensionFactory; _logger = logger; }
protected override void Context() { _dialogCreator = A.Fake <IDialogCreator>(); _dataRepositoryTask = A.Fake <IDataRepositoryTask>(); _quantityDisplayPathMapper = A.Fake <IQuantityPathToQuantityDisplayPathMapper>(); _pkAnalysesTask = A.Fake <IPKAnalysesTask>(); _globalPKAnalysisMapper = A.Fake <IGlobalPKAnalysisToDataTableMapper>(); _dimensionFactory = A.Fake <IDimensionFactory>(); sut = new PKAnalysisExportTask(_dialogCreator, _dataRepositoryTask, _quantityDisplayPathMapper, _globalPKAnalysisMapper, _dimensionFactory); }
protected override void Context() { _dimensionFactory = A.Fake <IDimensionFactory>(); _view = A.Fake <IParameterIdentificationErrorHistoryFeedbackView>(); _chartDisplayPresenter = A.Fake <IChartDisplayPresenter>(); sut = new ParameterIdentificationErrorHistoryFeedbackPresenter(_view, _chartDisplayPresenter, _dimensionFactory); _runState = A.Fake <ParameterIdentificationRunState>(); _errorHistory = new List <float>(); A.CallTo(() => _runState.ErrorHistory).Returns(_errorHistory); }
public ObjectBaseFactory( Utility.Container.IContainer container, IDimensionFactory dimensionFactory, IIdGenerator idGenerator, ICreationMetaDataFactory creationMetaDataFactory) { _container = container; _dimensionFactory = dimensionFactory; _idGenerator = idGenerator; _creationMetaDataFactory = creationMetaDataFactory; }
public CompartmentImporter(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, IMoBiSpatialStructureFactory spatialStructureFactory, IMoBiDimensionFactory moBiDimensionFactory, ASTHandler astHandler, IMoBiContext context, IFormulaFactory formulaFactory, IUnitDefinitionImporter unitDefinitionImporter) : base(objectPathFactory, objectBaseFactory, astHandler, context) { _objectBaseFactory = objectBaseFactory; _spatialStructureFactory = spatialStructureFactory; _dimensionFactory = moBiDimensionFactory; _formulaFactory = formulaFactory; _unitDefinitionImporter = unitDefinitionImporter; }
public override void GlobalContext() { base.GlobalContext(); _dialogCreator = A.Fake <IDialogCreator>(); _importer = A.Fake <IImporter>(); _applicationController = A.Fake <IApplicationController>(); _reloadPresenter = A.Fake <IImporterReloadPresenter>(); _dimensionFactory = A.Fake <IDimensionFactory>(); A.CallTo(() => _applicationController.Start <IImporterReloadPresenter>()).Returns(_reloadPresenter); A.CallTo(() => _reloadPresenter.Canceled()).Returns(false); }
public SerializationContextFactory( IDimensionFactory dimensionFactory, IObjectBaseFactory objectBaseFactory, ICloneManagerForModel cloneManagerForModel, IContainer container ) { _dimensionFactory = dimensionFactory; _objectBaseFactory = objectBaseFactory; _cloneManagerForModel = cloneManagerForModel; _container = container; }
protected override void Context() { _context = A.Fake <IInteractionTaskContext>(); _simulationPersitor = A.Fake <ISimulationPersistor>(); _dialogCreator = A.Fake <IDialogCreator>(); _forbiddenNamesRetriever = A.Fake <IForbiddenNamesRetriever>(); _dataRepositoryTask = A.Fake <IDataRepositoryTask>(); _simulationModelExporter = A.Fake <ISimModelExporter>(); _reportCreator = A.Fake <IModelReportCreator>(); _dimensionFactory = A.Fake <IDimensionFactory>(); sut = new EditTasksForSimulation(_context, _simulationPersitor, _dialogCreator, _forbiddenNamesRetriever, _dataRepositoryTask, _reportCreator, _simulationModelExporter, _dimensionFactory); }
public SimulationTransferLoader(IDimensionFactory dimensionFactory, IObjectBaseFactory objectBaseFactory, ISimulationPersistor simulationPersister, IProjectRetriever projectRetriever, IDialogCreator dialogCreator, IJournalTask journalTask, ICloneManagerForModel cloneManagerForModel) { _dimensionFactory = dimensionFactory; _objectBaseFactory = objectBaseFactory; _simulationPersister = simulationPersister; _projectRetriever = projectRetriever; _dialogCreator = dialogCreator; _journalTask = journalTask; _cloneManagerForModel = cloneManagerForModel; }
protected override void Context() { _objectBaseFactory = A.Fake <IObjectBaseFactory>(); _formulaMapper = A.Fake <IFormulaBuilderToFormulaMapper>(); _parameterMapper = A.Fake <IParameterBuilderCollectionToParameterCollectionMapper>(); _keywordReplacerTask = A.Fake <IKeywordReplacerTask>(); _formulaFactory = A.Fake <IFormulaFactory>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _parameterFactory = A.Fake <IParameterFactory>(); sut = new MoleculeBuilderToMoleculeAmountMapper(_objectBaseFactory, _formulaMapper, _parameterMapper, _dimensionFactory, _keywordReplacerTask, _formulaFactory, _parameterFactory); }
public EditTasksForSimulation(IInteractionTaskContext interactionTaskContext, ISimulationPersistor simulationPersistor, IDialogCreator dialogCreator, IForbiddenNamesRetriever forbiddenNamesRetriver, IDataRepositoryTask dataRepositoryTask, IModelReportCreator reportCreator, ISimModelExporter simModelExporter, IDimensionFactory dimensionFactory) : base(interactionTaskContext) { _simulationPersistor = simulationPersistor; _dialogCreator = dialogCreator; _forbiddenNamesRetriver = forbiddenNamesRetriver; _dataRepositoryTask = dataRepositoryTask; _reportCreator = reportCreator; _simModelExporter = simModelExporter; _dimensionFactory = dimensionFactory; }
protected override void Context() { _chartDisplayView = A.Fake <IChartDisplayView>(); _curveBinderFactory = A.Fake <ICurveBinderFactory>(); _exceptionManager = A.Fake <IExceptionManager>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _axisBinderFactory = A.Fake <IAxisBinderFactory>(); _dataModeMapper = A.Fake <ICurveToDataModeMapper>(); _contextMenuFactory = A.Fake <IViewItemContextMenuFactory>(); _chartExportTask = A.Fake <ICurveChartExportTask>(); _applicationSettings = A.Fake <IApplicationSettings>(); sut = new ChartDisplayPresenter(_chartDisplayView, _curveBinderFactory, _contextMenuFactory, _axisBinderFactory, _dataModeMapper, _chartExportTask, _applicationSettings); var dataRepository = DomainHelperForSpecs.SimulationDataRepositoryFor("Sim"); A.CallTo(() => _dimensionFactory.MergedDimensionFor(A <DataColumn> ._)).ReturnsLazily(x => x.GetArgument <DataColumn>(0).Dimension); _curve = new Curve(); _curve.SetxData(dataRepository.BaseGrid, _dimensionFactory); _curve.SetyData(dataRepository.AllButBaseGrid().First(), _dimensionFactory); A.CallTo(_curveBinderFactory).WithReturnType <ICurveBinder>().ReturnsLazily(x => { var curve = x.GetArgument <Curve>(0); var curveBinder = A.Fake <ICurveBinder>(); A.CallTo(() => curveBinder.SeriesIds).Returns(SeriesIdsFor(curve)); A.CallTo(() => curveBinder.LLOQ).Returns(LLOQFor(curve)); A.CallTo(() => curveBinder.ContainsSeries(curve.Id)).Returns(true); A.CallTo(() => curveBinder.Id).Returns(curve.Id); A.CallTo(() => curveBinder.Curve).Returns(curve); return(curveBinder); }); _curveChart = new CurveChart(); _curveChart.AddAxis(new Axis(AxisTypes.X) { Dimension = _curve.xDimension }); _curveChart.AddAxis(new Axis(AxisTypes.Y) { Dimension = _curve.yDimension }); _xAxisBinder = createAxisBinderFor(_curveChart.AxisBy(AxisTypes.X)); _yAxisBinder = createAxisBinderFor(_curveChart.AxisBy(AxisTypes.Y)); A.CallTo(() => _axisBinderFactory.Create(_curveChart.AxisBy(AxisTypes.X), _chartDisplayView.ChartControl, _curveChart)).Returns(_xAxisBinder); A.CallTo(() => _axisBinderFactory.Create(_curveChart.AxisBy(AxisTypes.Y), _chartDisplayView.ChartControl, _curveChart)).Returns(_yAxisBinder); SetupChart(); sut.Edit(_curveChart); }
public static IDimension OptimalDimension(this IDimensionFactory dimensionFactory, IDimension defaultDimension) { if (defaultDimension == null) { return(null); } var templateColumn = new DataColumn { Dimension = defaultDimension }; return(dimensionFactory.MergedDimensionFor(templateColumn)); }
protected override void Context() { _context = A.Fake <IInteractionTaskContext>(); _simulationPersistor = A.Fake <ISimulationPersistor>(); _dialogCreator = A.Fake <IDialogCreator>(); _dataRepositoryTask = A.Fake <IDataRepositoryExportTask>(); _simulationModelExporter = A.Fake <ISimModelExporter>(); _reportCreator = A.Fake <IModelReportCreator>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _parameterIdentificationSimulationPathUpdater = A.Fake <IParameterIdentificationSimulationPathUpdater>(); sut = new EditTasksForSimulation(_context, _simulationPersistor, _dialogCreator, _dataRepositoryTask, _reportCreator, _simulationModelExporter, _dimensionFactory, _parameterIdentificationSimulationPathUpdater); }
public ReactionImporter(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, IMoBiDimensionFactory moBiDimensionFactory, ASTHandler astHandler, IMoBiContext context, IReactionBuildingBlockFactory reactionBuildingBlockFactory, IFunctionDefinitionImporter functionDefinitionImporter, ISpeciesImporter speciesImporter, IUnitDefinitionImporter unitDefinitionImporter) : base(objectPathFactory, objectBaseFactory, astHandler, context) { _dimensionFactory = moBiDimensionFactory; ReactionBuilderList = new List <IReactionBuilder>(); _passiveTransportList = new List <ITransportBuilder>(); _reactionBuildingBlock = reactionBuildingBlockFactory.Create().WithName(SBMLConstants.SBML_REACTION_BB); _passiveTransportBuildingBlock = ObjectBaseFactory.Create <IPassiveTransportBuildingBlock>() .WithName(SBMLConstants.SBML_PASSIVETRANSPORTS_BB); _functionDefinitionImporter = functionDefinitionImporter; _speciesImporter = speciesImporter; _unitDefinitionImporter = unitDefinitionImporter; }
protected override void Context() { _view = A.Fake <IAxisSettingsView>(); _dimensionFactory = A.Fake <IDimensionFactory>(); sut = new AxisSettingsPresenter(_view, _dimensionFactory); _axisX = new Axis(AxisTypes.X); _axisY = new Axis(AxisTypes.Y); _axes = new List <Axis> { _axisX, _axisY }; sut.Edit(_axes); }
public ChartPresenterContext(IChartEditorAndDisplayPresenter chartEditorAndDisplayPresenter, ICurveNamer curveNamer, IDataColumnToPathElementsMapper dataColumnToPathElementsMapper, IChartTemplatingTask chartTemplatingTask, IPresentationSettingsTask presentationSettingsTask, IChartEditorLayoutTask chartEditorLayoutTask, IProjectRetriever projectRetriever, IDimensionFactory dimensionFactory) { EditorAndDisplayPresenter = chartEditorAndDisplayPresenter; DataColumnToPathElementsMapper = dataColumnToPathElementsMapper; TemplatingTask = chartTemplatingTask; PresenterSettingsTask = presentationSettingsTask; EditorLayoutTask = chartEditorLayoutTask; ProjectRetriever = projectRetriever; DimensionFactory = dimensionFactory; CurveNamer = curveNamer; }
protected override void Context() { _dimensionFactory = A.Fake <IDimensionFactory>(); _objectBaseFactory = A.Fake <IObjectBaseFactory>(); _withIdRepository = A.Fake <IWithIdRepository>(); _dataRepositories = new List <DataRepository>(); _cloneManagerForModel = A.Fake <ICloneManagerForModel>(); _container = A.Fake <Utility.Container.IContainer>(); sut = new SerializationContext(_dimensionFactory, _objectBaseFactory, _withIdRepository, _dataRepositories, _cloneManagerForModel, _container); _formula1 = new ExplicitFormula().WithId("1"); _formula2 = new ExplicitFormula().WithId("1"); }
public PKAnalysisExportTask( IDialogCreator dialogCreator, IDataRepositoryExportTask dataRepositoryTask, IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper, IGlobalPKAnalysisToDataTableMapper globalPKAnalysisToDataTableMapper, IDimensionFactory dimensionFactory) { _dialogCreator = dialogCreator; _dataRepositoryTask = dataRepositoryTask; _globalPKAnalysisToDataTableMapper = globalPKAnalysisToDataTableMapper; _dimensionFactory = dimensionFactory; _quantityDisplayPathMapper = quantityDisplayPathMapper; }
protected override void Context() { _view = A.Fake <IEditFormulaPathListView>(); _moBiFormulaTask = A.Fake <IMoBiFormulaTask>(); _context = A.Fake <IMoBiContext>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _userSettings = A.Fake <IUserSettings>(); _contextMenuFactory = A.Fake <IViewItemContextMenuFactory>(); _circularReferenceChecker = A.Fake <ICircularReferenceChecker>(); _formulaUsablePathDTOMapper = A.Fake <IFormulaUsablePathToFormulaUsablePathDTOMapper>(); sut = new EditFormulaPathListPresenter(_view, _moBiFormulaTask, _context, _dimensionFactory, _userSettings, _contextMenuFactory, _circularReferenceChecker, _formulaUsablePathDTOMapper); }
private static void setUpDimensionMergings(IDimensionFactory factory) { var concentrationDimension = factory.Dimension(Constants.Dimension.MASS_CONCENTRATION); var molarConcentrationDimomension = factory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION); factory.AddMergingInformation(new MoBiDimensionMergingInformation <IQuantity>(concentrationDimension, molarConcentrationDimomension, new MolWeightDimensionConverterForFormulaUsable(concentrationDimension, molarConcentrationDimomension))); factory.AddMergingInformation(new MoBiDimensionMergingInformation <DataColumn>(concentrationDimension, molarConcentrationDimomension, new ConcentrationToMolarConcentrationConverterForDataColumn(concentrationDimension, molarConcentrationDimomension))); factory.AddMergingInformation(new MoBiDimensionMergingInformation <DataColumn>(molarConcentrationDimomension, concentrationDimension, new MolarConcentrationToConcentrationConverterForDataColumn(molarConcentrationDimomension, concentrationDimension))); }
public SimpleChartPresenter(ISimpleChartView view, IChartDisplayPresenter chartDisplayPresenter, IChartFactory chartFactory, IEventPublisher eventPublisher, IPresentationUserSettings presentationUserSettings, IDimensionFactory dimensionFactory) : base(view) { _chartDisplayPresenter = chartDisplayPresenter; _chartFactory = chartFactory; _eventPublisher = eventPublisher; _presentationUserSettings = presentationUserSettings; _dimensionFactory = dimensionFactory; _view.AddView(_chartDisplayPresenter.View); _chartDisplayPresenter.DisableCurveAndAxisEdits(); LogLinSelectionEnabled = false; AddSubPresenters(_chartDisplayPresenter); }
private IDimension yDimensionFor(IDimensionFactory dimensionFactory) { if (yData.ContainsRelatedColumn(AuxiliaryType.GeometricMeanPop)) { return(dimensionFactory.MergedDimensionFor(yData.GetRelatedColumn(AuxiliaryType.GeometricMeanPop))); } if (yData.ContainsRelatedColumn(AuxiliaryType.ArithmeticMeanPop)) { return(dimensionFactory.MergedDimensionFor(yData.GetRelatedColumn(AuxiliaryType.ArithmeticMeanPop))); } return(dimensionFactory.MergedDimensionFor(yData)); }
public MoleculeBuilderToMoleculeAmountMapper(IObjectBaseFactory objectBaseFactory, IFormulaBuilderToFormulaMapper formulaMapper, IParameterBuilderToParameterMapper parameterMapper, IDimensionFactory dimensionFactory, IKeywordReplacerTask keywordReplacerTask, IFormulaFactory formulaFactory, IParameterFactory parameterFactory) { _objectBaseFactory = objectBaseFactory; _formulaMapper = formulaMapper; _parameterMapper = parameterMapper; _keywordReplacerTask = keywordReplacerTask; _formulaFactory = formulaFactory; _parameterFactory = parameterFactory; _amountDimension = dimensionFactory.Dimension(Constants.Dimension.MOLAR_AMOUNT); }
protected override void Context() { _presentationSettingsTask = A.Fake <IPresentationSettingsTask>(); _view = A.Fake <IParameterIdentificationMultipleRunsAnalysisView>(); _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>(); _curveNamer = A.Fake <ICurveNamer>(); _pathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>(); _chartTemplatingTask = A.Fake <IChartTemplatingTask>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>(); _chartEditorLayoutTask = A.Fake <IChartEditorLayoutTask>(); _projectRetreiver = A.Fake <IProjectRetriever>(); _chartPresenterContext = A.Fake <ChartPresenterContext>(); A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartEditorAndDisplayPresenter); A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer); A.CallTo(() => _chartPresenterContext.DataColumnToPathElementsMapper).Returns(_pathElementsMapper); A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask); A.CallTo(() => _chartPresenterContext.PresenterSettingsTask).Returns(_presentationSettingsTask); A.CallTo(() => _chartPresenterContext.DimensionFactory).Returns(_dimensionFactory); A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartEditorLayoutTask); A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetreiver); sut = new ParameterIdentificationTimeProfileChartPresenter(_view, _chartPresenterContext, _displayUnitRetriever); _timeProfileAnalysis = new ParameterIdentificationTimeProfileChart(); _outputMapping1 = A.Fake <OutputMapping>(); _outputMapping2 = A.Fake <OutputMapping>(); _observedData1 = DomainHelperForSpecs.ObservedData(); _observedData2 = DomainHelperForSpecs.ObservedData(); A.CallTo(() => _outputMapping1.WeightedObservedData).Returns(new WeightedObservedData(_observedData1)); A.CallTo(() => _outputMapping2.WeightedObservedData).Returns(new WeightedObservedData(_observedData2)); _parameterIdentification = new ParameterIdentification(); _parameterIdentification.AddOutputMapping(_outputMapping1); _parameterIdentification.AddOutputMapping(_outputMapping2); _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); _parameterIdentification.AddResult(_parameterIdentificationRunResult); _optimizationRunResult = new OptimizationRunResult(); _parameterIdentificationRunResult.BestResult = _optimizationRunResult; _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); _parameterIdentification.AddResult(_parameterIdentificationRunResult); _optimizationRunResult2 = new OptimizationRunResult(); _parameterIdentificationRunResult.BestResult = _optimizationRunResult2; }