/// <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; }
/// <summary> /// Creates a new <see cref="Differencer<T>"/> that utilizes the specified /// <see cref="ISequenceMatcher<T>"/>. /// </summary> /// <typeparam name="T">The type of item within the sequences.</typeparam> /// <param name="sequenceMatcher">The sequence matcher.</param> /// <returns>The <see cref="Differencer<T>"/>.</returns> public static Differencer <T> CreateDifferencer <T>(this ISequenceMatcher <T> sequenceMatcher) { return(new Differencer <T>(sequenceMatcher)); }
/// <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)); }