public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { base.UpdatePropertiesFrom(source, cloneManager); var sourceEntity = source as IEntity; sourceEntity?.Tags.Each(t => AddTag(t.Value)); }
public CheckNameVisitor(IObjectTypeResolver objectTypeResolver, IAliasCreator aliasCreator, IParameterStartValuePathTask psvPathTask, IMoleculeStartValuePathTask msvPathTask, ICloneManager cloneManager) { _objectTypeResolver = objectTypeResolver; _aliasCreator = aliasCreator; _psvPathTask = psvPathTask; _msvPathTask = msvPathTask; _cloneManager = cloneManager; Expression <Func <IObjectBase, string> > nameString = x => x.Name; _namePropertyName = nameString.Name(); Expression <Func <IApplicationBuilder, string> > appBuilderMoleculeName = x => x.MoleculeName; _appBuilderMoleculeNamePropertyName = appBuilderMoleculeName.Name(); Expression <Func <IReactionPartnerBuilder, string> > reactionPartnerMoleculeName = x => x.MoleculeName; _reactionPartnerMoleculeNamePropertyName = reactionPartnerMoleculeName.Name(); Expression <Func <IEventAssignmentBuilder, IObjectPath> > eventObjectPath = x => x.ObjectPath; _eventObjectPathPropertyName = eventObjectPath.Name(); Expression <Func <TransporterMoleculeContainer, string> > tranportName = x => x.TransportName; _tranportNamePropertyName = tranportName.Name(); }
public virtual ObserverSetProperties Clone(ICloneManager cloneManager) { var clone = new ObserverSetProperties(); clone.AddObserverSetMappings(ObserverSetMappings.Select(x => x.Clone(cloneManager))); return(clone); }
public DistributedParameterToTableParameterConverter( IFormulaFactory formulaFactory, IEntityPathResolver entityPathResolver, IParameterFactory parameterFactory, ICloneManager cloneManager, IParameterQuery parameterQuery, IDimensionRepository dimensionRepository, IOntogenyRepository ontogenyRepository, IFullPathDisplayResolver fullPathDisplayResolver, IInterpolation interpolation, IParameterStartValuesCreator parameterStartValuesCreator, IObjectPathFactory objectPathFactory, IGenderRepository genderRepository) { _formulaFactory = formulaFactory; _entityPathResolver = entityPathResolver; _parameterFactory = parameterFactory; _cloneManager = cloneManager; _parameterQuery = parameterQuery; _dimensionRepository = dimensionRepository; _ontogenyRepository = ontogenyRepository; _fullPathDisplayResolver = fullPathDisplayResolver; _interpolation = interpolation; _parameterStartValuesCreator = parameterStartValuesCreator; _objectPathFactory = objectPathFactory; _genderRepository = genderRepository; _timeDimension = dimensionRepository.Time; _yearUnit = _timeDimension.Unit(dimensionRepository.AgeInYears.BaseUnit.Name); }
public virtual InteractionProperties Clone(ICloneManager cloneManager) { var clone = new InteractionProperties(); Interactions.Each(x => clone.AddInteraction(x.Clone(cloneManager))); return(clone); }
public override void GlobalContext() { base.GlobalContext(); _compoundProcessRepository = IoC.Resolve <ICompoundProcessRepository>(); _cloneManager = IoC.Resolve <ICloneManager>(); _enzymeFactory = IoC.Resolve <IIndividualEnzymeFactory>(); _transporterFactory = IoC.Resolve <IIndividualTransporterFactory>(); _modelPropertiesTask = IoC.Resolve <IModelPropertiesTask>(); _modelConfigurationRepository = IoC.Resolve <IModelConfigurationRepository>(); _compound = DomainFactoryForSpecs.CreateStandardCompound(); _individual = DomainFactoryForSpecs.CreateStandardIndividual(); _protocol = DomainFactoryForSpecs.CreateStandardIVBolusProtocol(); _enzyme = _enzymeFactory.CreateFor(_individual).DowncastTo <IndividualEnzyme>().WithName("CYP"); _enzyme.GetRelativeExpressionNormParameterFor(CoreConstants.Compartment.Plasma).Value = _relExpNormPls; _enzyme.GetRelativeExpressionNormParameterFor(CoreConstants.Compartment.BloodCells).Value = _relExpNormBloodCells; _enzyme.GetRelativeExpressionNormParameterFor(CoreConstants.Compartment.VascularEndothelium).Value = _relExpVascEndo; _individual.AddMolecule(_enzyme); _hct = _individual.Organism.Parameter(CoreConstants.Parameters.HCT).Value; _metabolizationProcess = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstantsForSpecs.Process.METABOLIZATION_SPECIFIC_FIRST_ORDER).DowncastTo <PartialProcess>()); _metabolizationProcess.Name = "My Partial Process"; _metabolizationProcess.Parameter(ConverterConstants.Parameter.CLspec).Value = 15; _compound.AddProcess(_metabolizationProcess); _simulationRunOptions = new SimulationRunOptions { RaiseEvents = false }; }
public ExecutionContext(IPKSimProjectRetriever projectRetriever, IWithIdRepository withIdRepository, ILazyLoadTask lazyLoadTask, IRegistrationTask registrationTask, IEventPublisher eventPublisher, IObjectTypeResolver objectTypeResolver, IBuildingBlockRetriever buildingBlockRetriever, ICompressedSerializationManager serializationManager, IBuildingBlockVersionUpdater buildingBlockVersionUpdater, IProjectChangedNotifier projectChangedNotifier, ICloner cloner, IContainer container, IReportGenerator reportGenerator, IFullPathDisplayResolver fullPathDisplayResolver, IParameterChangeUpdater parameterChangeUpdater) { _projectRetriever = projectRetriever; _withIdRepository = withIdRepository; _lazyLoadTask = lazyLoadTask; _registrationTask = registrationTask; _eventPublisher = eventPublisher; _objectTypeResolver = objectTypeResolver; _buildingBlockRetriever = buildingBlockRetriever; _serializationManager = serializationManager; _buildingBlockVersionUpdater = buildingBlockVersionUpdater; _projectChangedNotifier = projectChangedNotifier; CloneManager = cloner; _container = container; _reportGenerator = reportGenerator; _fullPathDisplayResolver = fullPathDisplayResolver; _parameterChangeUpdater = parameterChangeUpdater; }
public virtual EventProperties Clone(ICloneManager cloneManager) { var clone = new EventProperties(); clone.AddEventMappings(EventMappings.Select(x => x.Clone(cloneManager))); return(clone); }
public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { base.UpdatePropertiesFrom(source, cloneManager); var valueMapping = source as ValueMappingGroupingDefinition; valueMapping?.Mapping.KeyValues.Each(kv => Mapping.Add(kv.Key, cloneManager.Clone(kv.Value))); }
protected override void Context() { _view = A.Fake <IModalChartTemplateManagerView>(); _cloneManager = A.Fake <ICloneManager>(); _chartTemplateManagerPresenter = A.Fake <IChartTemplateManagerPresenter>(); sut = new ModalChartTemplateManagerPresenter(_view, _chartTemplateManagerPresenter, _cloneManager); }
public virtual EventProperties Clone(ICloneManager cloneManager) { var clone = new EventProperties(); EventMappings.Each(em => clone.AddEventMapping(em.Clone(cloneManager))); return(clone); }
protected override void Context() { _cloneManager = new DummyCloneManager(); sut = new Schema(); //2 hours delay sut.Add(DomainHelperForSpecs.ConstantParameterWithValue(120).WithName(Constants.Parameters.START_TIME)); //6hours between repetitions sut.Add(DomainHelperForSpecs.ConstantParameterWithValue(360).WithName(CoreConstants.Parameter.TIME_BETWEEN_REPETITIONS)); //repeat the schema 4 times sut.Add(DomainHelperForSpecs.ConstantParameterWithValue(4).WithName(CoreConstants.Parameter.NUMBER_OF_REPETITIONS)); var schemaItem1 = new SchemaItem().WithName("SchemaItem1"); schemaItem1.Add(DomainHelperForSpecs.ConstantParameterWithValue(0).WithName(Constants.Parameters.START_TIME)); schemaItem1.Add(DomainHelperForSpecs.ConstantParameterWithValue(1).WithName(CoreConstants.Parameter.INPUT_DOSE)); schemaItem1.ApplicationType = ApplicationTypes.Intravenous; var schemaItem2 = new SchemaItem().WithName("SchemaItem2"); schemaItem2.Add(DomainHelperForSpecs.ConstantParameterWithValue(180).WithName(Constants.Parameters.START_TIME)); schemaItem2.Add(DomainHelperForSpecs.ConstantParameterWithValue(2).WithName(CoreConstants.Parameter.INPUT_DOSE)); schemaItem2.ApplicationType = ApplicationTypes.Intravenous; sut.AddSchemaItem(schemaItem1); sut.AddSchemaItem(schemaItem2); }
public virtual ProcessSelection Clone(ICloneManager cloneManager) { var clone = new ProcessSelection(); clone.UpdatePropertiesFrom(this, cloneManager); return(clone); }
public override ProcessSelection Clone(ICloneManager cloneManager) { var clone = new EnzymaticProcessSelection(); clone.UpdatePropertiesFrom(this, cloneManager); return(clone); }
public virtual ModelProperties Clone(ICloneManager cloneManager) { return(new ModelProperties { ModelConfiguration = ModelConfiguration, CalculationMethodCache = CalculationMethodCache.Clone() }); }
public ChartFromTemplateService(IDimensionFactory dimensionFactory, IKeyPathMapper keyPathMapper, IDialogCreator dialogCreator, ICloneManager cloneManager, IChartUpdater chartUpdater) { _dimensionFactory = dimensionFactory; _keyPathMapper = keyPathMapper; _dialogCreator = dialogCreator; _cloneManager = cloneManager; _chartUpdater = chartUpdater; }
public ModalChartTemplateManagerPresenter(IModalChartTemplateManagerView view, IChartTemplateManagerPresenter chartTemplateManagerPresenter, ICloneManager cloneManager) : base(view) { _chartTemplateManagerPresenter = chartTemplateManagerPresenter; _cloneManager = cloneManager; AddSubPresenters(_chartTemplateManagerPresenter); view.SetBaseView(_chartTemplateManagerPresenter.BaseView); }
public ProcessSelectionGroup Clone(ICloneManager cloneManager) { var clone = new ProcessSelectionGroup(ProductNameTemplate); _partialProcesses.Each(x => clone.AddPartialProcessSelection(x.Clone(cloneManager))); _systemicProcesses.Each(x => clone.AddSystemicProcessSelection(x.Clone(cloneManager))); return(clone); }
public DisplayUnitsPresenter(IDisplayUnitsView view, IDimensionFactory dimensionFactory, IDialogCreator dialogCreator, ISerializationTask serializationTask, ICloneManagerForModel cloneManager) : base(view) { _dimensionFactory = dimensionFactory; _dialogCreator = dialogCreator; _serializationTask = serializationTask; _cloneManager = cloneManager; }
public CompoundProcessesSelection Clone(ICloneManager cloneManager) { return(new CompoundProcessesSelection { MetabolizationSelection = MetabolizationSelection.Clone(cloneManager), TransportAndExcretionSelection = TransportAndExcretionSelection.Clone(cloneManager), SpecificBindingSelection = SpecificBindingSelection.Clone(cloneManager) }); }
protected override void Context() { base.Context(); _cloneManager = A.Fake <ICloneManager>(); _simulationDiagramManager = A.Fake <ISimulationDiagramManager>(); _moBiSimulation = new MoBiSimulation { DiagramManager = _simulationDiagramManager }; }
protected override void Context() { base.Context(); _cloneManager = A.Fake <ICloneManager>(); _diagramManager = A.Fake <ISpatialStructureDiagramManager>(); _spatialStructure = new MoBiSpatialStructure { DiagramManager = _diagramManager }; }
protected override void Context() { base.Context(); _cloneManager = A.Fake <ICloneManager>(); _sourceParameterIdentification = new IdentificationParameter { Name = "TOTO", IsFixed = true, UseAsFactor = false }; _sourceParameterIdentification.AddLinkedParameter(_parameterSelection); }
protected override void Context() { base.Context(); _cloneManager = A.Fake <ICloneManager>(); _sourceFixedLimitDefinition = new FixedLimitsGroupingDefinition("Field"); _sourceFixedLimitDefinition.SetLimits(new [] { 1.5, 2.5 }.OrderBy(x => x)); _sourceFixedLimitDefinition.Dimension = DomainHelperForSpecs.TimeDimensionForSpecs(); _sourceFixedLimitDefinition.DisplayUnit = _sourceFixedLimitDefinition.Dimension.Unit("h"); }
protected override void Context() { base.Context(); _cloneManager = A.Fake <ICloneManager>(); _sourceMolecule = new IndividualEnzyme { Ontogeny = new UserDefinedOntogeny() }; _clonedOntogeny = new UserDefinedOntogeny(); A.CallTo(() => _cloneManager.Clone(_sourceMolecule.Ontogeny)).Returns(_clonedOntogeny); }
public UserDisplayUnitsPresenter(IUserDisplayUnitsView view, IDisplayUnitsPresenter displayUnitsPresenter, IUserSettings userSettings, ICloneManager cloneManager) : base(view) { _displayUnitsPresenter = displayUnitsPresenter; _userSettings = userSettings; _cloneManager = cloneManager; AddSubPresenters(_displayUnitsPresenter); _view.AddView(_displayUnitsPresenter.View); _settingsToEdit = cloneManager.Clone(_userSettings.DisplayUnits); }
public ImportPopulationSettings Clone(ICloneManager cloneManager) { var settings = new ImportPopulationSettings { BaseIndividual = cloneManager.Clone(BaseIndividual) }; _allFiles.Each(f => settings.AddFile(f.Clone())); return(settings); }
public void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { var originalChart = source as SummaryChart; if (originalChart == null) { return; } UpdateFrom(originalChart); }
public RandomPopulationSettings Clone(ICloneManager cloneManager) { var clone = new RandomPopulationSettings { BaseIndividual = cloneManager.Clone(BaseIndividual), NumberOfIndividuals = NumberOfIndividuals }; _genderRatios.Each(gr => clone.AddGenderRatio(gr.Clone())); _parameterRanges.Each(pr => clone.AddParameterRange(pr.Clone())); return(clone); }
public void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { var originalChart = source as IndividualSimulationComparison; if (originalChart == null) { return; } UpdateFrom(originalChart); }