I'm afraid there's no way to get that. You get sequence points only for methods with an actual body, obviously interface and abstract methods don't have that.
On Thu, May 8, 2014 at 1:24 PM, graham walsh <[email protected]> wrote: > Hi > > Thanks a million for the reply. > > I've been progressing here and seen that for interfaces I cannot get my > hands on the file name that contains the interface definition (method body > // method body instructions are null) so I can't get my hands on them. > > Is there a way of getting the filename for the interfaces? I seem to have > read a few posts that strongly suggest its not possible. > > If there are any demos out there that do this kind of thing I'd be delighted > to get my hands on them. > > thanks much and have a nice day > > G > > > On Wednesday, May 7, 2014 10:10:36 PM UTC+2, graham walsh wrote: >> >> Hi, >> >> I've successfully read a pdb file and read the pdb symbols. >> >> var readerParameters = new ReaderParameters { ReadSymbols = >> true }; >> PdbReaderProvider provider = new PdbReaderProvider(); >> ModuleDefinition module = >> ModuleDefinition.ReadModule("MyCompany.Visitors.Data.dll"); >> >> Mono.Cecil.Pdb.PdbReader reader = ( Mono.Cecil.Pdb.PdbReader) >> provider.GetSymbolReader(module, module.FullyQualifiedName); >> module.ReadSymbols(reader) >> >> In the visual studio debugger, I can see the Mono.Cecil.Pdb.PdbReader >> reader instance and can see all the functions it contains. Now I want to >> get my hands on these functions however I'm not sure what interface/routine >> to use. The functions (see below) are all private. >> >> I want to iterate over the functions and documents readonly private >> attributes below. Can anybody tell me how to do this? >> >> public class PdbReader : ISymbolReader, IDisposable >> { >> private int age; >> private readonly Dictionary<string, Document> documents = new >> Dictionary<string, Document>(); >> private readonly Dictionary<uint, PdbFunction> functions = new >> Dictionary<uint, PdbFunction>(); >> private Guid guid; >> private readonly Stream pdb_file; >> >> internal PdbReader(Stream file) >> { >> this.pdb_file = file; >> } >> >> ...... >> } >> >> >> thanks >> >> G > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
