Charlie P
Charlie P

Reputation: 45

Visual Studio Codelens for methods invoked by reflection

Codelens in Visual Studio is great, but I've inherited a code base where some methods are invoked via reflection.

This is a simplified sample.

...
if (method.Name.EndsWith("UpdatePlatformModel");
     method.Invoke(element, parameters)
...

enter image description here

In the attached image, the codelens states the method has 0 (zero) references. I understand that since this is invoked at runtime, the reference number won't reflect the number of times the method is called.

Is there a way via Visual Studio, a third party plugin, or any other strategy, where I can analyze the code to identify if a method is referenced or not?

Upvotes: 0

Views: 55

Answers (0)

Related Questions