Welcome to mirror list, hosted at ThFree Co, Russian Federation.

IDifferenceService.cs « Differencing « TextData « Def « Text « Editor « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c11853206057c4ace39ff4feb0805f32604504da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//  Licensed under the MIT License. See License.txt in the project root for license information.
//
using System.Collections.Generic;

namespace Microsoft.VisualStudio.Text.Differencing
{
    /// <summary>
    /// Determines the differences between two
    /// sequences, based on adding or removing elements (but not translating or copying elements).
    /// </summary>
    /// <remarks>This is a MEF component part, and should be imported as follows:
    /// [Import]
    /// IDifferenceService diffService = null;
    /// </remarks>
    public interface IDifferenceService
    {
        /// <summary>
        /// Computes the differences between the two sequences.
        /// </summary>
        /// <typeparam name="T">The type of the sequences.</typeparam>
        /// <param name="left">The left sequence. In most cases this is the "old" sequence.</param>
        /// <param name="right">The right sequence. In most cases this is the "new" sequence.</param>
        /// <returns>A collection of the differences between the two sequences.</returns>
        IDifferenceCollection<T> DifferenceSequences<T>(IList<T> left, IList<T> right);

        /// <summary>
        /// Computes the differences between the two sequences.  The supplied predicate will be called on each
        /// step through the <paramref name="left"/> sequence.
        /// </summary>
        /// <typeparam name="T">The type of the sequences.</typeparam>
        /// <param name="left">The left sequence. In most cases this is the "old" sequence.</param>
        /// <param name="right">The right sequence. In most cases this is the "new" sequence.</param>
        /// <param name="continueProcessingPredicate">A predicate that will be called on each step through the <paramref name="left"/> sequence,
        /// with the option of stopping the algorithm prematurely.</param>
        /// <returns>A collection of the differences between the two sequences.</returns>
        IDifferenceCollection<T> DifferenceSequences<T>(IList<T> left, IList<T> right, ContinueProcessingPredicate<T> continueProcessingPredicate);
    }
}