예제 #1
0
 /// <summary>Adjust the Edit to reflect positions in the base sequence.</summary>
 /// <remarks>Adjust the Edit to reflect positions in the base sequence.</remarks>
 /// <?></?>
 /// <param name="e">
 /// edit to adjust in-place. Prior to invocation the indexes are
 /// in terms of the two subsequences; after invocation the indexes
 /// are in terms of the base sequences.
 /// </param>
 /// <param name="a">the A sequence.</param>
 /// <param name="b">the B sequence.</param>
 public static void ToBase <S>(Edit e, NGit.Diff.Subsequence <S> a, NGit.Diff.Subsequence
                               <S> b) where S : Sequence
 {
     e.beginA += a.begin;
     e.endA   += a.begin;
     e.beginB += b.begin;
     e.endB   += b.begin;
 }
예제 #2
0
 /// <summary>Adjust the Edits to reflect positions in the base sequence.</summary>
 /// <remarks>Adjust the Edits to reflect positions in the base sequence.</remarks>
 /// <?></?>
 /// <param name="edits">
 /// edits to adjust in-place. Prior to invocation the indexes are
 /// in terms of the two subsequences; after invocation the indexes
 /// are in terms of the base sequences.
 /// </param>
 /// <param name="a">the A sequence.</param>
 /// <param name="b">the B sequence.</param>
 /// <returns>
 /// always
 /// <code>edits</code>
 /// (as the list was updated in-place).
 /// </returns>
 public static EditList ToBase <S>(EditList edits, NGit.Diff.Subsequence <S> a, NGit.Diff.Subsequence
                                   <S> b) where S : Sequence
 {
     foreach (Edit e in edits)
     {
         ToBase(e, a, b);
     }
     return(edits);
 }