private ModelRelationship AddRelationshipIfNotExists(RoslynSymbolRelation symbolRelation) { var sourceEntity = _model.GetEntityBySymbol(symbolRelation.SourceSymbol); var targetEntity = _model.GetEntityBySymbol(symbolRelation.TargetSymbol); var relationship = new ModelRelationship(sourceEntity, targetEntity, symbolRelation.Type); return(_model.GetOrAddRelationship(relationship)); }
private static RoslynSymbolRelation GetOriginalDefinition(RoslynSymbolRelation symbolRelation) { return(symbolRelation.WithRelatedSymbol(GetOriginalDefinition(symbolRelation.RelatedSymbol))); }