Can i get a list of all parameters which a method is called?

Is there a way to get a list of all parameters a specific method is called?

Let me explain what i want to accomplish.

I have a class ResourceSource with a method GetText(string labelName, string fallbackText). I want to extract all labelName and corresponding fallbackText which exists in the whole Solution and save it in an csv or whatever. I can then use the result to generate Sqlscripts.


Comment actions Permalink

Hello Sven
     You can run ReSharper | Inspect | Value Origin on each parameter, expand all nodes in the view and then export the results. Let me know if this helps. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

"Develop with pleasure!"

Comment actions Permalink

This is the feature i was looking for, but unfortunatly it is not the complete solution to my problem.

There are some drawbacks and probably some bugs.

- i dont get the parameters in isolation. I still need to extract the concrete string from the export results text based
- i can only do this for each parameter. Then i loose the coupling beetween both Parameters

Ideally i would want to get:
"Label1"; "Fallback 1"
"Label2"; "Fallback 2"

Maybe i missing something how i can achieve this. Maybe I can write an addin which to exactly what i want.

There are also two Bugs (Resharper 6.0.2202.688):
-Changing values in the Context DropDown has no effect.
-Not all Parameters are found. Find Usage gets more results than Value Origin. The exact number of differnces is the number of the Find usage from a specific projekt. I also cant find any items manually from this projekt in the Value Origin results. So i assume only items from this projekt are missing. Most projects of my Solution are C#. The projekt where items are missing is a Web VB.NET project and most of the calls (if not all) are in code behind files from aspx-sites.


Please sign in to leave a comment.