public override async Task <ModelObserverSet> MapToModel(SnapshotObserverSet snapshot, SnapshotContext snapshotContext) { var observerSet = _observerSetFactory.Create(); MapSnapshotPropertiesToModel(snapshot, observerSet); var observers = await _observerMapper.MapToModels(snapshot.Observers, snapshotContext); observers?.Each(x => observerSet.Add(x)); return(observerSet); }
public IPKSimCommand Create() { _observedBuildingBlockDTO = _buildingBlockDTOFactory.CreateFor <ObserverSet>(); ObserverSet = _observerSetFactory.Create(); _subPresenterItemManager.AllSubPresenters.Each(x => x.Edit(ObserverSet)); _view.BindToProperties(_observedBuildingBlockDTO); _view.Display(); if (_view.Canceled) { return(new PKSimEmptyCommand()); } _propertiesMapper.MapProperties(_observedBuildingBlockDTO, ObserverSet); return(new PKSimMacroCommand()); }