Example #1
0
        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));
        }
Example #2
0
 private static RoslynSymbolRelation GetOriginalDefinition(RoslynSymbolRelation symbolRelation)
 {
     return(symbolRelation.WithRelatedSymbol(GetOriginalDefinition(symbolRelation.RelatedSymbol)));
 }