c# - Is there a way to create programmatically something similar to the Visual Studio 'Go To Implementation' functionality? -


I see a way to read the contents of a method / function call, performance like some Visual Studio 'Go-like implementation (Or F11 in debug) but using the code.

For example, if I have C #. Cc file that contains the following code:

  var characters = "AAAAAABBBBBBCCCCCDDDDD"; Var position = 0; Var newPosition; // Example # 1 myObject.FirstSixCharacters = characters.SubString (position, 6); Position + = 6; // Example # 2 myObject.SecondSetOfSixCharacters = Atatic object.form (character, position, 6, newpox out); Position + new position;  

I want to know what is the method to 'drop' the program and read the code in the 'Ameth' method of the 'atheistic object' object?

To keep the question in context, I have a big enterprise solution that, in essence - parses a large string of characters in many DTO areas, I am thinking of writing something which is called 'parser' . To open the C file, reads the contents of the code, then determines the position and length of each DTO field based on the processing applied at the time of assignment.

It is quite straight forward to get for the statements where field assignment is the result of a simple 'substring' function ( as example # 1, above ). But on occasion, the code uses static objects / methods to remove the string of the string and update the positional variable (, as per example # 2, above ). This led me to this question- "How can I programmatically read the code within .cs file, and when necessary, follow the calls made for the objects / methods that come in the code and those CC Read the contents of the file "?

Note: The code I am trying to analyze is not compiled jointly, so decompiliaries are not necessary to get results.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -