public IDsiRelation AddRelation(string consumerName, string providerName, string type, int weight, string context) { Logger.LogDataModelMessage("Add relation consumerName={consumerName} providerName={providerName} type={type} weight={weight}"); DsiRelation relation = null; _relationCount++; IDsiElement consumer = _elementsDataModel.FindElementByName(consumerName); IDsiElement provider = _elementsDataModel.FindElementByName(providerName); if ((consumer != null) && (provider != null)) { relation = AddOrUpdateRelation(consumer.Id, provider.Id, type, weight); } else { AnalyzerLogger.LogDataModelRelationNotResolved(consumerName, providerName); } return(relation); }
public IDsiElement FindElementByName(string name) { return(_elementsDataModel.FindElementByName(name)); }