What is a crosslink?

Resharper has an Architectural View window, and it has a transitional term, but it's a little confusing, as it actually means. This blog post from them covers it, but in an incomplete way.

I'm starting to think that this option is intended solely to simplify the decision diagram, is this correct?

If not, can you explain what the transition link means?

+6
source share
1 answer

When ReSharper talks about a transitive reference, it means an assembly reference that is made implicitly, referring to another intermediate assembly. For example, let's say I have a project with the assembly "Core.dll". I am creating a project called "Features.dll" that references Core.dll. This is a direct link.

Now say I'm adding a test project, Features.Tests.dll. This assembly checks the code in Features.dll and therefore has a direct link to Features.dll. Then the links will look like this:

Features.Tests.dll -(References)-> Features.dll -(References)-> Core.dll 

Each dll directly refers to the dll used. But we can also say that Features.Tests.dll has a "cross reference" to Core.dll. I.e:.

 Features.Tests.dll -(References)-> Core.dll 

In the end, it cannot work if Core.dll is not present.

When using the ReSharper architecture view, transitive links are hidden by default, firstly, to simplify the diagram, but also because a transitional link is implied - if the diagram shows that Features.Tests.dll refers to Features.dll and Features.dll refers to Core.dll, then it is visually obvious that Features.Tests.dll and Core.dll require and, therefore, transit to Core.dll. You can make your transitional links more visible by turning on the Show Crosslinking button.

One way to remember how transitive links work is to think about math, for example. If A> B and B> C, then A> C. "greater than" is a transitive relation.

+17
source

Source: https://habr.com/ru/post/969356/


All Articles