Understanding CodeLens
CodeLens is a powerful set of tools that is useful for finding references in code, relationships between your different components, seeing the history of changes in the code, linked bugs, code reviews, unit tests, and so on.
In this section, we will analyze the most important tools of this feature. Let's start by seeing how we can find references in our code.
Finding references in code
CodeLens is presented in our code files from the first time we use Visual Studio. We can check this by going to any class, method, or property and verifying that a sentence appears, indicating the number of references in the project about it. In Figure 7.2, we can see that we have opened the WeatherForecastController.cs
file, which shows us that three references have been found for the WeatherForecastController
class:
This means that the WeatherForecastController
class...