NanoByte.Common
2.6.1
|
An undo command that adds or removes an element from a collection. More...
Protected Member Functions | |
CollectionCommand (ICollection< T > collection, T element) | |
Creates a new collection command. More... | |
![]() | |
abstract void | OnExecute () |
Template method to perform the desired action. More... | |
abstract void | OnUndo () |
Template method to undo the changes made by OnExecute. More... | |
Protected Attributes | |
readonly ICollection< T > | Collection |
The collection to be modified. More... | |
readonly T | Element |
The element to be added or removed from Collection. More... | |
Properties | |
object | Value [get] |
![]() | |
object? | Value [get] |
Additional Inherited Members | |
![]() | |
void | Execute () |
Performs the desired action. More... | |
virtual void | Undo () |
Undoes the changes made by Execute. More... | |
An undo command that adds or removes an element from a collection.
T | The type of elements the collection contains. |
T | : | notnull |
|
inlineprotected |
Creates a new collection command.
collection | The collection to be modified. |
element | The element to be added or removed from collection . |
|
protected |
The collection to be modified.
|
protected |
The element to be added or removed from Collection.