コード例 #1
0
 private ListSelectionData(
     IListSelection selection,
     IDictionary <int, T> dictionary)
 {
     Selection      = selection.CopySelection();
     BaseDictionary = new Dictionary <int, T>(dictionary);
 }
コード例 #2
0
 public ListSelectionData(
     IListSelection selection)
 {
     Selection      = selection.CopySelection();
     BaseDictionary = new Dictionary <int, T>(Selection.Count);
     foreach (var index in Selection)
     {
         BaseDictionary.Add(index, default);
     }
 }
コード例 #3
0
 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]);
     }
 }