private void UpdateWeights(IDsmRelation relation, ModifyWeight modifyWeight) { int consumerId = relation.ConsumerId; int providerId = relation.ProviderId; IDsmElement currentConsumer = _elementsDataModel.FindElementById(consumerId); while (currentConsumer != null) { IDsmElement currentProvider = _elementsDataModel.FindElementById(providerId); while (currentProvider != null) { modifyWeight(currentConsumer.Id, currentProvider.Id, relation.Weight); currentProvider = currentProvider.Parent; } currentConsumer = currentConsumer.Parent; } }
public IDsmElement GetElementById(int id) { return(_elementsDataModel.FindElementById(id)); }