/// <summary> /// Returns a collection of source ranges that belongs to the document passed as parameter /// </summary> /// <param name="document"></param> /// <param name="ranges"></param> /// <returns></returns> private static SourceRangeCollection getDocumentRanges(TextDocument document, FileSourceRangeCollection ranges) { SourceRangeCollection ranges2 = new SourceRangeCollection(document); if ((document != null) && (ranges != null)) { foreach (FileSourceRange range in ranges) { TextDocument textDocument = getTextDocument(range.File); if ((textDocument == null) || (textDocument != document)) { continue; } ranges2.Add(range.Range); } } return ranges2; }
/// <summary> /// Returns a collection of source ranges that belongs to the document passed as parameter /// </summary> /// <param name="document"></param> /// <param name="ranges"></param> /// <returns></returns> private static SourceRangeCollection getDocumentRanges(TextDocument document, FileSourceRangeCollection ranges) { SourceRangeCollection ranges2 = new SourceRangeCollection(document); if ((document != null) && (ranges != null)) { foreach (FileSourceRange range in ranges) { TextDocument textDocument = getTextDocument(range.File); if ((textDocument == null) || (textDocument != document)) { continue; } ranges2.Add(range.Range); } } return(ranges2); }