public void AddEventMapping() { var eventMapping = _eventTask.CreateEventMapping(); _allEventsMappingDTO.Add(_eventMappingDTOMapper.MapFrom(eventMapping, _simulation)); OnStatusChanged(); }
public void Handle(AddOutputIntervalToOutputSchemaEvent eventToHandle) { if (!Equals(_outputSchema, eventToHandle.Container)) { return; } _allIntervals.Add(_outputIntervalToOutputIntervalDTOMapper.MapFrom(eventToHandle.Entity)); }
internal static async Task AddDevices(Environment environment, IEnvironmentService service, IEnumerable<Guid> deviceIds, INotifyList<IDevice, Guid> devices) { IEnumerable<IDevice> localDevices = null; await Task.Run(() => { localDevices = deviceIds. AsParallel().AsOrdered(). Select(did => Device.Create(did, environment, service).Result); }); devices.Add(localDevices); }
public void AddPoint() { var newPoint = new ValuePointDTO(_tableParameter, _editedFormula, new ValuePoint(double.NaN, double.NaN)); try { _allPoints.Add(newPoint); } catch (ValuePointAlreadyExistsForPointException) { _allPoints.Remove(newPoint); throw; } _view.EditPoint(newPoint); }
private void editFormula(TableFormula tableFormula) { _editedFormula = tableFormula ?? CreateTableFormula(); if (_allPoints != null) { _allPoints.CollectionChanged -= notifyChange; } _allPoints = new NotifyList <ValuePointDTO>(); _editedFormula.AllPoints().Each(p => _allPoints.Add(new ValuePointDTO(_tableParameter, _editedFormula, p))); string yName = string.IsNullOrEmpty(_editedFormula.YName) ? _tableParameter.Name : _editedFormula.YName; _view.XCaption = Constants.NameWithUnitFor(_editedFormula.XName, _editedFormula.XDisplayUnit); _view.YCaption = Constants.NameWithUnitFor(yName, _editedFormula.YDisplayUnit); _view.BindTo(_allPoints); _allPoints.CollectionChanged += notifyChange; if (tableFormula == null) { ViewChanged(); } }
private void addObserverSetMapping(ObserverSetMapping observerSetMapping) { _allObserverSetMappingDTOs.Add(_observerSetMappingDTOMapper.MapFrom(observerSetMapping, _simulation)); }
protected override void Because() { _richList.Add(new AnImplementation()); }
private void addEventMapping(EventMapping eventMapping) { _allEventsMappingDTO.Add(_eventMappingDTOMapper.MapFrom(eventMapping, _simulation)); }