1

Let's say I have a C# event called EventX. I want to see a tree of all code paths that result in that event being invoked, including methods that invoke the event, other events that are handled by those methods, etc, multiple layers deep.

Example:

EventX <- Invoked by MethodA() <- Is an event handler for EventA <- Is invoked by MethodB() <- Is called by MethodC() <- Is an event handler for EventC <- Is invoked by MethodD

Of course, this would be only one deep branch of the tree. There may be multiple methods that invoke each event, multiple handlers for each event, and multiple callers for each method. I want to see one big tree of the whole thing, generated in one step.

Is this something that Resharper can do? If so, how?

JoeMjr2
  • 3,804
  • 4
  • 34
  • 62

1 Answers1

0

You can try ReSharper's Value Tracking. If invoked on a value, such as a variable, it will show a tree of where that variable is set (e.g. from a parameter), and then where that value comes from (e.g. the values of the parameter in all calls to the method), and so on, recursively. I'm not entirely sure it works with events, I haven't tested it. You can read more about Value Tracking in the web help.

citizenmatt
  • 18,085
  • 5
  • 55
  • 60