다음을 통해 공유


ListMerger Class

Definition

Handles merging operations for setting collections.

public ref class ListMerger : Microsoft::VisualStudio::Settings::IListMerger
[Windows::Foundation::Metadata::WebHostHidden]
class ListMerger : Microsoft::VisualStudio::Settings::IListMerger
public class ListMerger : Microsoft.VisualStudio.Settings.IListMerger
type ListMerger = class
    interface IListMerger
Public Class ListMerger
Implements IListMerger
Inheritance
ListMerger
Implements

Remarks

Members of this class may be called on any thread.

Constructors

ListMerger()

Initializes a new instance of ListMerger.

Methods

ThreeWayMerge<T,U>(IReadOnlyList<KeyValuePair<T,U>>, IReadOnlyList<KeyValuePair<T, U>>, IReadOnlyList<KeyValuePair<T,U>>, IEqualityComparer<T>, IEqualityComparer<U>, ISettingsLogger)

Given a baseline and two current lists, computes the merged result. The differences between the baseline and the current lists are analyzed in terms of the following operations:

  • Add a new item to the front (index 0)
  • Remove an item from anywhere This method derives an ordered list of operations that would transform the baseline into each of the current lists, combines them, and applies them to the baseline to generate the result. The order of operations in "first" and "second" is maintained within the list but not between lists; for example, if the baseline is {0}, first is {1,0} and second is {2,0}, the result may be {1,2,0} or {2,1,0}. Both are equally valid.

Explicit Interface Implementations

IListMerger.ThreeWayMerge<T,U>(IReadOnlyList<KeyValuePair<T,U>>, IReadOnlyList<KeyValuePair<T,U>>, IReadOnlyList<KeyValuePair<T, U>>, IEqualityComparer<T>, IEqualityComparer<U>, ISettingsLogger)

Same as the static ThreeWayMerge method; provided to facilitate unit testing.

Applies to