private void resetObjectIdIfRequired(IWithId withId) { if (_withIdRepository.ContainsObjectWithId(withId.Id)) { _objectIdResetter.ResetIdFor(withId); } }
private void register(IWithId objectBase) { if (objectBase == null) { return; } _withIdRepository.Register(objectBase); }
public override void LoadSettingsForSubject(IWithId subject) { base.LoadSettingsForSubject(subject); _pkAnalysisPresenter.LoadSettingsForSubject(subject); _settings = _presentationSettingsTask.PresentationSettingsFor <DefaultPresentationSettings>(this, subject); setViewMode(_settings.IsEqual(CHART_DISPLAY_MODE_SETTING, ChartDisplayMode.PKAnalysis)); }
private void unregister(IWithId objectToUnregister) { if (objectToUnregister == null) { return; } _withIdRepository.Unregister(objectToUnregister.Id); }
protected override void Context() { base.Context(); _dataRepo1 = new DataRepository("OBS1"); _simmulation = new MoBiSimulation().WithId("ID"); _parentContext = new SerializationContext(_dimensionFactory, _objectBaseFactory, new WithIdRepository(), new[] { _dataRepo1 }, _cloneManagerForModel, _container); _parentContext.Register(_simmulation); }
private EntityMetaData mapFrom(IWithId entityWithId) { var entityMetaData = new EntityMetaData { Id = entityWithId.Id }; serialize(entityMetaData, entityWithId); return(entityMetaData); }
public virtual void RemoveNodeFor(IWithId objectWithId) { var node = NodeFor(objectWithId); if (node == null) { return; } _view.DestroyNode(node); }
protected void RemoveClassifiableForWrappedObject(IWithId wrappedObject) { var classifiable = _allClassifiables.FindById(wrappedObject.Id); if (classifiable == null) { return; } RemoveClassifiable(classifiable); }
protected override void Context() { base.Context(); _derserialziedObject = A.Fake <IWithId>(); _objectWithId = A.Fake <IWithId>(); var stream = new byte[] { 1, 2 }; A.CallTo(() => _serializationManager.Serialize(_objectWithId)).Returns(stream); A.CallTo(() => _serializationManager.Deserialize <IWithId>(stream, null)).Returns(_derserialziedObject); }
protected void Unregister(IWithId objectWithId) { if (objectWithId == null) { return; } var registrationTask = IoC.Resolve <IRegistrationTask>(); registrationTask.Unregister(objectWithId); }
protected void Unregister(IWithId objectWithId) { if (objectWithId == null) { return; } var unregisterTask = IoC.Resolve <IUnregisterTask>(); unregisterTask.UnregisterAllIn(objectWithId); }
protected override void Context() { base.Context(); _project = A.Fake <IProject>(); _subject1 = A.Fake <IWithId>(); _classifiable1 = A.Fake <IClassifiableWrapper>().WithId("1"); _classifiable2 = A.Fake <IClassifiableWrapper>().WithId("2"); A.CallTo(() => _repository.Get(_classifiable1.Id)).Returns(_subject1); A.CallTo(() => _repository.Get(_classifiable2.Id)).Returns(null); A.CallTo(() => _project.AllClassifiablesByType <IClassifiableWrapper>()).Returns(new[] { _classifiable1, _classifiable2 }); }
public void UnregisterAllIn(IWithId objectToUnregister) { var objectBase = objectToUnregister as IObjectBase; if (objectBase == null) { Visit(objectToUnregister); } else { objectBase.AcceptVisitor(this); } }
public override void LoadSettingsForSubject(IWithId subject) { base.LoadSettingsForSubject(subject); _pkAnalysisPresenter.LoadSettingsForSubject(subject); if (_settings.IsEqual(_chartDisplayModeSetting, ChartDisplayMode.PKAnalysis)) { ShowAnalysis(); } else { ShowChart(); } }
public void Register(IWithId objectToRegister) { if (objectToRegister == null) { return; } var objectBase = objectToRegister as IObjectBase; if (objectBase == null) { register(objectToRegister); } else { objectBase.AcceptVisitor(this); } }
public void RegisterAllIn(IWithId objectToRegister) { //If already registered, no need to register the whole hiearchy again if (_withIdRepository.ContainsObjectWithId(objectToRegister.Id)) { return; } var objectBase = objectToRegister as IObjectBase; if (objectBase == null) { Visit(objectToRegister); } else { objectBase.AcceptVisitor(this); } }
public virtual void Register(IWithId objectWithId) { if (string.IsNullOrEmpty(objectWithId.Id)) { return; } if (!ContainsObjectWithId(objectWithId.Id)) { _entities.Add(objectWithId); return; } var existing = Get(objectWithId.Id); if (ReferenceEquals(existing, objectWithId)) { return; } throw new NotUniqueIdException(objectWithId.Id); }
public virtual ITreeNode NodeFor(IWithId objectWithId) { return(objectWithId != null?_view.NodeById(objectWithId.Id) : null); }
protected override void Context() { base.Context(); _dataRepo1 = new DataRepository("OBS1"); _simmulation = new IndividualSimulation().WithId("ID"); }
public void Unregister(IWithId objectToUnregister) { _unregisterObjectVisitor.Unregister(objectToUnregister); }
protected override void Context() { _workspace = A.Fake <IWithWorkspaceLayout>(); sut = new PresentationSettingsTask(_workspace); _subject = A.Fake <IWithId>(); }
protected TPresentationSettings PresentationSettingsFor(IWithId withId, string presentationKey) { return(_presentationSettingsTask.PresentationSettingsFor <TPresentationSettings>(presentationKey, withId)); }
public void Register(IWithId objectToRegister) { _registerObjectVisitor.Register(objectToRegister); }
public override void LoadSettingsForSubject(IWithId subject) { base.LoadSettingsForSubject(subject); _globalPKAnalysisPresenter.LoadSettingsForSubject(subject); }
public void LoadSettingsForSubject(IWithId subject) { _settings = _presentationSettingsTask.PresentationSettingsFor <DefaultPresentationSettings>(this, subject); }
public void Unregister(IWithId objectToUnregister) { _registrationTask.Unregister(objectToUnregister); }
public void Register(IWithId objectToRegister) { _registrationTask.Register(objectToRegister); }
public void LoadSettingsForSubject(IWithId subject) { _settings = _presentationSettingsTask.PresentationSettingsFor <ParameterGroupsPresenterSettings>(this, subject); _settings.DefaultParameterGroupingModeId = _userSettings.DefaultParameterGroupingMode; _parameterGroupingMode = _settings.ParameterGroupingMode; }
public void Register(IWithId objectToRegister) { }
public void Unregister(IWithId objectToUnregister) { }