public ListViewItemsAddUndoUnit(ResXEditorControl control, List <ListViewKeyItem> items, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (items == null) { throw new ArgumentNullException("items"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Items = items; // create the reverse unit RemoveUnit = new ListViewRemoveItemsUndoUnit(control, items, conflictResolver); }
public ListViewNewItemCreateUndoUnit(ResXEditorControl control, ListViewKeyItem item, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (item == null) { throw new ArgumentNullException("item"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Item = item; RemoveUnit = new ListViewRemoveItemsUndoUnit(control, new List <ListViewKeyItem>() { item }, conflictResolver); }