Class CollectionCommand<T>
An undo command that adds or removes an element from a collection.
Inherited Members
Namespace: NanoByte.Common.Undo
Assembly: NanoByte.Common.dll
Syntax
public abstract class CollectionCommand<T> : SimpleCommand, IValueCommand, IUndoCommand
Type Parameters
Name | Description |
---|---|
T | The type of elements the collection contains. |
Constructors
CollectionCommand(ICollection<T>, T)
An undo command that adds or removes an element from a collection.
Declaration
protected CollectionCommand(ICollection<T> collection, T element)
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | collection | The collection to be modified. |
T | element | The element to be added or removed from |
Fields
Collection
The collection to be modified.
Declaration
protected readonly ICollection<T> Collection
Field Value
Type | Description |
---|---|
ICollection<T> |
Element
The element to be added or removed from Collection.
Declaration
protected readonly T Element
Field Value
Type | Description |
---|---|
T |
Properties
Value
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
Object |