public bool GetSourceStartEnd(ISymbolDocument[] docs, int[] lines, int[] columns) { uint i; bool pRetVal = false; int spCount = 0; if (docs != null) { spCount = docs.Length; } else if (lines != null) { spCount = lines.Length; } else if (columns != null) { spCount = columns.Length; } // If we don't have at least 2 entries then return an error if (spCount < 2) { throw new ArgumentException(); } // Make sure all arrays are the same length. if ((docs != null) && (spCount != docs.Length)) { throw new ArgumentException(); } if ((lines != null) && (spCount != lines.Length)) { throw new ArgumentException(); } if ((columns != null) && (spCount != columns.Length)) { throw new ArgumentException(); } ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[docs.Length]; m_unmanagedMethod.GetSourceStartEnd(unmanagedDocuments, lines, columns, out pRetVal); if (pRetVal) { for (i = 0; i < docs.Length; i++) { docs[i] = new SymbolDocument(unmanagedDocuments[i]); } } return(pRetVal); }
public ISymbolDocument[] GetDocuments() { int cDocs = 0; m_reader.GetDocuments(0, out cDocs, null); ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[cDocs]; m_reader.GetDocuments(cDocs, out cDocs, unmanagedDocuments); ISymbolDocument[] documents = new SymbolDocument[cDocs]; uint i; for (i = 0; i < cDocs; i++) { documents[i] = new SymbolDocument(unmanagedDocuments[i]); } return(documents); }
public bool GetSourceStartEnd(ISymbolDocument[] docs, int[] lines, int[] columns) { uint i; bool pRetVal = false; int spCount = 0; if (docs != null) spCount = docs.Length; else if (lines != null) spCount = lines.Length; else if (columns != null) spCount = columns.Length; // If we don't have at least 2 entries then return an error if (spCount < 2) throw new ArgumentException(); // Make sure all arrays are the same length. if ((docs != null) && (spCount != docs.Length)) throw new ArgumentException(); if ((lines != null) && (spCount != lines.Length)) throw new ArgumentException(); if ((columns != null) && (spCount != columns.Length)) throw new ArgumentException(); ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[docs.Length]; m_unmanagedMethod.GetSourceStartEnd(unmanagedDocuments, lines, columns, out pRetVal); if (pRetVal) { for (i = 0; i < docs.Length;i++) { docs[i] = new SymbolDocument(unmanagedDocuments[i]); } } return pRetVal; }
public void GetSequencePoints(int[] offsets, ISymbolDocument[] documents, int[] lines, int[] columns, int[] endLines, int[] endColumns) { int spCount = 0; if (offsets != null) spCount = offsets.Length; else if (documents != null) spCount = documents.Length; else if (lines != null) spCount = lines.Length; else if (columns != null) spCount = columns.Length; else if (endLines != null) spCount = endLines.Length; else if (endColumns != null) spCount = endColumns.Length; // Don't do anything if they're not really asking for anything. if (spCount == 0) return; // Make sure all arrays are the same length. if ((offsets != null) && (spCount != offsets.Length)) throw new ArgumentException(); if ((lines != null) && (spCount != lines.Length)) throw new ArgumentException(); if ((columns != null) && (spCount != columns.Length)) throw new ArgumentException(); if ((endLines != null) && (spCount != endLines.Length)) throw new ArgumentException(); if ((endColumns != null) && (spCount != endColumns.Length)) throw new ArgumentException(); ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[documents.Length]; int cPoints = 0; uint i; m_unmanagedMethod.GetSequencePoints(documents.Length, out cPoints, offsets, unmanagedDocuments, lines, columns, endLines, endColumns); // Create the SymbolDocument form the IntPtr's for (i = 0; i < documents.Length; i++) { documents[i] = new SymbolDocument(unmanagedDocuments[i]); } return; }
public ISymbolDocument[] GetDocuments() { int cDocs = 0; m_reader.GetDocuments(0, out cDocs, null); ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[cDocs]; m_reader.GetDocuments(cDocs, out cDocs, unmanagedDocuments); ISymbolDocument[] documents = new SymbolDocument[cDocs]; uint i; for (i = 0; i < cDocs; i++) { documents[i] = new SymbolDocument(unmanagedDocuments[i]); } return documents; }
public void GetSequencePoints(int[] offsets, ISymbolDocument[] documents, int[] lines, int[] columns, int[] endLines, int[] endColumns) { int spCount = 0; if (offsets != null) { spCount = offsets.Length; } else if (documents != null) { spCount = documents.Length; } else if (lines != null) { spCount = lines.Length; } else if (columns != null) { spCount = columns.Length; } else if (endLines != null) { spCount = endLines.Length; } else if (endColumns != null) { spCount = endColumns.Length; } // Don't do anything if they're not really asking for anything. if (spCount == 0) { return; } // Make sure all arrays are the same length. if ((offsets != null) && (spCount != offsets.Length)) { throw new ArgumentException(); } if ((lines != null) && (spCount != lines.Length)) { throw new ArgumentException(); } if ((columns != null) && (spCount != columns.Length)) { throw new ArgumentException(); } if ((endLines != null) && (spCount != endLines.Length)) { throw new ArgumentException(); } if ((endColumns != null) && (spCount != endColumns.Length)) { throw new ArgumentException(); } ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[documents.Length]; int cPoints = 0; uint i; m_unmanagedMethod.GetSequencePoints(documents.Length, out cPoints, offsets, unmanagedDocuments, lines, columns, endLines, endColumns); // Create the SymbolDocument form the IntPtr's for (i = 0; i < documents.Length; i++) { documents[i] = new SymbolDocument(unmanagedDocuments[i]); } return; }