I need to be able to get from .NET assembly a class/struct/interface definition location (filename,begin_line,begin_column,end_line,end_column) in my source files.
First solution that came to my mind was using some pdb quering api, but it seems that I can obtain such info only for method definition this way. Or maybe I'm wrong...
To provide the context, i'm trying to build an add-in to VS 2008 which compiles all solution projects through VS automation model, takes assemblies and using Reflections makes some visual modeling representation. What i need is a connection between source code and model elements. In fact i could even analyze/modify sources in some way to make them remember the location info.
Any ideas would be appreciated.