private void Toggle() { ListOfT newSelection = this.selection; this.selection = this.selectionSet.selection; int newIndexOfPrimarySelection = this.indexOfPrimarySelection; this.indexOfPrimarySelection = this.selectionSet.indexOfPrimarySelection; this.selectionSet.SetSelectionInternal(newSelection, newIndexOfPrimarySelection); }
public SelectionChangeUndoUnit(SelectionSet <T, ListOfT> selectionSet, ListOfT selection, int indexOfPrimarySelection) { this.selectionSet = selectionSet; this.selection = selection; this.indexOfPrimarySelection = indexOfPrimarySelection; }