public void GetSequencePoints(int[] offsets,
ISymbolDocument[] documents,
int[] lines,
int[] columns,
int[] endLines,
int[] endColumns)
{
int hr;
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();
COMException Exception;
IntPtr[] IDocuments = new IntPtr[documents.Length];
int cPoints;
uint i;
hr = SymMethod_GetSequencePoints(m_Method, documents.Length, out cPoints,
IDocuments, offsets,
lines, columns,
endLines, endColumns);
if (hr < 0)
{
Exception = new COMException("Call to GetSequencePoints failed.", hr);
throw Exception;
}
// Create the SymDocument form the IntPtr's
for (i = 0; i < documents.Length; i++)
{
documents[i] = new SymDocument(IDocuments[i]);
}
return;
}