public int[] GetRanges(ISymbolDocument document, int line, int column) { int cRanges; unmanagedMethod.GetRanges(((SymbolDocument)document).InternalDocument, line, column, 0, out cRanges, null); int[] ranges = new int[cRanges]; unmanagedMethod.GetRanges(((SymbolDocument)document).InternalDocument, line, column, cRanges, out cRanges, ranges); return(ranges); }
public int[] GetRanges(ISymbolDocument document, int line, int column) { var symDoc = document as SymbolDocument; if (symDoc == null) { throw new ArgumentException("document is not a non-null SymbolDocument instance"); } uint arySize; method.GetRanges(symDoc.SymUnmanagedDocument, (uint)line, (uint)column, 0, out arySize, null); var ary = new int[arySize]; method.GetRanges(symDoc.SymUnmanagedDocument, (uint)line, (uint)column, (uint)ary.Length, out arySize, ary); return(ary); }
public int[] GetRanges(ISymbolDocument document, int line, int column) { var symDocument = document as SymbolDocument; if (symDocument == null) { throw new InvalidOperationException(); } int size; HRESULT.ThrowOnFailure(_unmanaged.GetRanges(symDocument.Unmanaged, line, column, 0, out size, null)); int[] ranges = new int[size]; HRESULT.ThrowOnFailure(_unmanaged.GetRanges(symDocument.Unmanaged, line, column, ranges.Length, out size, ranges)); return(ranges); }