Exemplo n.º 1
0
        int IDebugProgram2.EnumCodeContexts(IDebugDocumentPosition2 pDocPos, out IEnumDebugCodeContexts2 ppEnum)
        {
            ThrowIfDisposed();

            string fileName;

            Marshal.ThrowExceptionForHR(pDocPos.GetFileName(out fileName));

            var start = new TEXT_POSITION[1];
            var end   = new TEXT_POSITION[1];

            Marshal.ThrowExceptionForHR(pDocPos.GetRange(start, end));

            var addr = new AD7MemoryAddress(this, fileName, (int)start[0].dwLine);

            ppEnum = new AD7CodeContextEnum(new[] { addr });
            return(VSConstants.S_OK);
        }
Exemplo n.º 2
0
 int IDebugDocumentContext2.EnumCodeContexts(out IEnumDebugCodeContexts2 ppEnumCodeCxts)
 {
     ppEnumCodeCxts = new AD7CodeContextEnum(new[] { Address });
     return(VSConstants.S_OK);
 }