private ListSelectionData( IListSelection selection, IDictionary <int, T> dictionary) { Selection = selection.CopySelection(); BaseDictionary = new Dictionary <int, T>(dictionary); }
public ListSelectionData( IListSelection selection) { Selection = selection.CopySelection(); BaseDictionary = new Dictionary <int, T>(Selection.Count); foreach (var index in Selection) { BaseDictionary.Add(index, default); } }
public ListSelectionData( IListSelection selection, IReadOnlyList <T> data) { Selection = selection.CopySelection(); BaseDictionary = new Dictionary <int, T>(Selection.Count); foreach (var index in Selection) { BaseDictionary.Add(index, data[index]); } }