Hi,

On Thu, Mar 31, 2011 at 2:51 PM, kellyb <[email protected]> wrote:
> I would love to be able to read in the actual source code of
> the places where this attribute occurs and split that out into the
> html report.
>
> Is it possible to do this with Mono.Cecil and/or Mono.Cecil.Mdb?  Is
> there another approach with the BCL that I might be missing?

There's nothing in Cecil (as it's not stored in assemblies nor in
debug symbols), or in the BCL, which will tell you the position of an
attribute in the source file.

If you have access to the source itself, you can parse it with
NRefactory and map Cecil types to NRefactory types. Or you could use
ILSpy's ICSharpCode.Decompiler to extract a C# representation of the
assembly, but then it won't be 1:1 with the original source.

Jb

-- 
--
mono-cecil

Reply via email to