protected AbstractStartValuesTask(IInteractionTaskContext interactionTaskContext, IEditTasksForBuildingBlock <TBuildingBlock> editTask, IIgnoreReplaceMergeManager <TStartValue> startValueBuildingBlockMergeManager, ICloneManagerForBuildingBlock cloneManagerForBuildingBlock, IMoBiFormulaTask moBiFormulaTask, ISpatialStructureFactory spatialStructureFactory, IMapper <ImportedQuantityDTO, TStartValue> dtoToQuantityToParameterStartValueMapper, IStartValuePathTask <TBuildingBlock, TStartValue> startValuePathTask) : base(interactionTaskContext, editTask) { _startValueBuildingBlockMergeManager = startValueBuildingBlockMergeManager; _cloneManagerForBuildingBlock = cloneManagerForBuildingBlock; _moBiFormulaTask = moBiFormulaTask; _spatialStructureFactory = spatialStructureFactory; _dtoToQuantityToParameterStartValueMapper = dtoToQuantityToParameterStartValueMapper; _startValuePathTask = startValuePathTask; }
private void checkStartValue <TStartValue, TBuildingBlock>(TStartValue startValue, IStartValuePathTask <TBuildingBlock, TStartValue> startValueTask) where TStartValue : class, IStartValue where TBuildingBlock : class, IStartValuesBuildingBlock <TStartValue> { if (Equals(_objectToRename, startValue)) { return; } var startValues = _buildingBlock as TBuildingBlock; if (string.Equals(startValue.Name, _oldName)) { _changes.Add(startValue, _buildingBlock, startValueTask.UpdateStartValueNameCommand(startValues, startValue, _newName)); } for (int i = 0; i < startValue.ContainerPath.Count; i++) { if (string.Equals(startValue.ContainerPath[i], _oldName)) { _changes.Add(startValue, _buildingBlock, startValueTask.UpdateStartValueContainerPathCommand(startValues, startValue, i, _newName)); } } }