Raja Nadar
Raja Nadar

Reputation: 9489

Find all classes involved in a method call

e.g. I want to extract the functionality of the MyLibrary.RelevantMethod() method into another library.

The aim is to create a new .csproj with the bare minimum class files needed to achieve this functionality.

Solutions tried:

while i manually continue extracting the class one-by-one using the call hierarchy, is there a faster way or a more automated way (semi works as well) to determine all the classes involved in a method call in C#?

if i can get the list, i can do a search on the physical folders nesting the .cs. files (every class has an equivalent .cs file) and just copy them over.

Upvotes: 0

Views: 338

Answers (1)

Sergey Vlasov
Sergey Vlasov

Reputation: 27880

You can find all classes involved in a method call with the Runtime Flow tool (developed by me). From the Runtime Summary window you can also copy these classes to the Clipboard for the selected module or a namespace.

Upvotes: 1

Related Questions