Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Differencer{T}" /> class.
 /// </summary>
 /// <param name="sequenceMatcher">The sequence matcher to use to find longest common subsequences.</param>
 public Differencer(ISequenceMatcher <T> sequenceMatcher)
 {
     if (sequenceMatcher == null)
     {
         throw new ArgumentNullException("sequenceMatcher");
     }
     _sequenceMatcher = sequenceMatcher;
 }
Example #2
0
 /// <summary>
 /// Creates a new <see cref="Differencer&lt;T&gt;"/> that utilizes the specified
 /// <see cref="ISequenceMatcher&lt;T&gt;"/>.
 /// </summary>
 /// <typeparam name="T">The type of item within the sequences.</typeparam>
 /// <param name="sequenceMatcher">The sequence matcher.</param>
 /// <returns>The <see cref="Differencer&lt;T&gt;"/>.</returns>
 public static Differencer <T> CreateDifferencer <T>(this ISequenceMatcher <T> sequenceMatcher)
 {
     return(new Differencer <T>(sequenceMatcher));
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Differencer{T}" /> class.
 /// </summary>
 /// <param name="sequenceMatcher">The sequence matcher to use to find longest common subsequences.</param>
 public Differencer(ISequenceMatcher <T> sequenceMatcher)
 {
     _sequenceMatcher = sequenceMatcher ?? throw new ArgumentNullException(nameof(sequenceMatcher));
 }