Class CollectionCommand<T>
An undo command that adds or removes an element from a collection.
public abstract class CollectionCommand<T> : SimpleCommand, IValueCommand, IUndoCommand where T : notnull
Type Parameters
T
The type of elements the collection contains.
- Inheritance
-
CollectionCommand<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CollectionCommand(ICollection<T>, T)
An undo command that adds or removes an element from a collection.
protected CollectionCommand(ICollection<T> collection, T element)
Parameters
collection
ICollection<T>The collection to be modified.
element
TThe element to be added or removed from
collection
.
Fields
Collection
The collection to be modified.
protected readonly ICollection<T> Collection
Field Value
- ICollection<T>
Element
The element to be added or removed from Collection.
protected readonly T Element
Field Value
- T
Properties
Value
public object Value { get; }