public static int FindNextEntryIndex(this PatchDocument document, int lineIndex) { var entryIndex = document.FindEntryIndex(lineIndex); return(Math.Min(entryIndex + 1, document.Entries.Count - 1)); }
public static int FindPreviousEntryIndex(this PatchDocument document, int lineIndex) { var entryIndex = document.FindEntryIndex(lineIndex); return(Math.Max(entryIndex - 1, 0)); }