NanoByte.Common
2.6.1
|
An undo command that removes an element from a collection. More...
Public Member Functions | |
RemoveFromCollection (ICollection< T > collection, T element) | |
Creates a new remove from collection command. More... | |
![]() | |
void | Execute () |
Performs the desired action. More... | |
virtual void | Undo () |
Undoes the changes made by Execute. More... | |
Static Public Member Functions | |
static RemoveFromCollection< T > | For< T > (ICollection< T > collection, T element) |
Creates a new remove from collection command. More... | |
Protected Member Functions | |
override void | OnExecute () |
Removes the element from the collection. More... | |
override void | OnUndo () |
Adds the element to the collection. More... | |
![]() | |
CollectionCommand (ICollection< T > collection, T element) | |
Creates a new collection command. More... | |
Additional Inherited Members | |
![]() | |
readonly ICollection< T > | Collection |
The collection to be modified. More... | |
readonly T | Element |
The element to be added or removed from Collection. More... | |
![]() | |
object | Value [get] |
![]() | |
object? | Value [get] |
An undo command that removes an element from a collection.
Factory methods for RemoveFromCollection<T>.
T | The type of elements the collection contains. |
T | : | notnull |
|
inline |
Creates a new remove from collection command.
collection | The collection to be modified. |
element | The element to be removed from collection . |
|
static |
Creates a new remove from collection command.
collection | The collection to be modified. |
element | The element to be removed from collection . |
T | The type of elements the collection contains. |
T | : | notnull | |
T | : | new | |
T | : | collection | |
T | : | element |
|
protectedvirtual |
Removes the element from the collection.
Implements NanoByte.Common.Undo.SimpleCommand.
|
protectedvirtual |
Adds the element to the collection.
Implements NanoByte.Common.Undo.SimpleCommand.