I would like to be able to parse vb.net code files, so I can examine the collection of Subs, Functions (and their contents, including comments), private variables, etc.
I can be open the actual source code files.
So for example, if I have:
Public Function FunctionOne(arg1 As String, arg2 as String) as Integer
here is some code
''//here are some comments
End Function
Public Sub FunctionOne(arg1 As integer, arg2 as integer)
here is some code
''//here are some comments
End Sub
I would like to be able to parse out all of the subs and functions and all of the code between the Public Function and End Function (actually, it would be nice to have the option to either include just the code within, or the entire function definition.
This would seem to call for some sort of a parsing library, or else fairly decent regex skills.
Any suggestions?
UPDATE: The main thing I'm trying to achieve is the parsing of the source code, so reflection is just fine perhaps for getting the list of functions and what not and I know how to do that, but it is a proper way of parsing the source code I am trying to figure out.