### DefaultUnDo.IUnDo.Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md Gets a description of what this IUnDo perform. ```APIDOC ## DefaultUnDo.IUnDo.Description Property ### Description Gets a description of what this IUnDo perform. ### Signature ```csharp object? DefaultUnDo.IUnDo.Description { get; } ``` ### Implements [Description](../IUnDo/Description.md 'DefaultUnDo.IUnDo.Description') ``` -------------------------------- ### DefaultUnDo.IUnDo.Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md Gets a description of what this IUnDo performs. ```APIDOC ## DefaultUnDo.IUnDo.Description Property ### Description Gets a description of what this IUnDo performs. ### Signature ```csharp object? DefaultUnDo.IUnDo.Description { get; } ``` ### Implements Implements [Description](../IUnDo/Description.md 'DefaultUnDo.IUnDo.Description') ``` -------------------------------- ### DefaultUnDo.IUnDo.Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md Gets a description of what this IUnDo performs. ```APIDOC ## DefaultUnDo.IUnDo.Description Property ### Description Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') perform. ### Property `object? DefaultUnDo.IUnDo.Description { get; }` Implements [Description](../IUnDo/Description.md 'DefaultUnDo.IUnDo.Description') ``` -------------------------------- ### IUnDo.Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDo/Description.md Gets a description of what this IUnDo performs. ```APIDOC ## IUnDo.Description Property ### Description Gets a description of what this IUnDo performs. ### Property Type object? (System.Object) ### Access get ``` -------------------------------- ### IUnDo.Description Property Implementation Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/index.md Gets a description of the action performed by this GroupUnDo instance. ```csharp object IUnDo.Description { get; } ``` -------------------------------- ### DefaultUnDo.IUnDo.Description Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Gets a description of the undo operation. ```APIDOC ## DefaultUnDo.IUnDo.Description ### Description Gets a human-readable description of the undo operation. ### Property Type string ``` -------------------------------- ### DefaultUnDo.GroupUnDo.Description (Explicit Interface Implementation) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Gets a description of the action performed by this IUnDo operation. ```APIDOC ## DefaultUnDo.IUnDo.Description Property ### Description Gets a description of what this IUnDo performs. ### Method Explicit Interface Implementation ### Endpoint N/A (Property access within the GroupUnDo class) ``` -------------------------------- ### UnDoManager.UndoDescriptions Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/UndoDescriptions.md Gets the descriptions in order of all the IUnDo which can be undone. ```APIDOC ## UnDoManager.UndoDescriptions Property ### Description Gets the descriptions in order of all the IUnDo which can be undone. ### Property Value System.Collections.Generic.IEnumerable - An enumerable collection of objects representing the undo descriptions. ``` -------------------------------- ### Setting a Field Value with Undo Source: https://github.com/doraku/defaultundo/blob/master/README.md Demonstrates how to record a field value change using the Do method, providing the new value, the undo action, and the current value. This example also includes an abstract base class for MVVM properties with undo support. ```csharp IUnDoManager manager = new UnDoManager(); int field = 42; manager.Do(v => field = v, 1337, field); // In mvvm we all have some kind of base type public abstract class ANotifyPropertyChanged : INotifyPropertyChanged { private sealed class UnDoProperty : UnDoField { private readonly ANotifyPropertyChanged _parent; private readonly string _propertyName; public UnDoProperty(ANotifyPropertyChanged parent, IUnDoManager unDoManager, string propertyName) : base(unDoManager, _ => $ ``` -------------------------------- ### UnDoManager.Version Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/Version.md Gets an System.Int32 representing the state of the IUnDoManager. ```APIDOC ## UnDoManager.Version Property ### Description Gets an System.Int32 representing the state of the IUnDoManager. ### Property Value System.Int32 ``` -------------------------------- ### IUnDoManager.RedoDescriptions Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/RedoDescriptions.md Gets the descriptions in order of all the IUnDo which can be redone. ```APIDOC ## IUnDoManager.RedoDescriptions Property ### Description Gets the descriptions in order of all the IUnDo which can be redone. ### Property Value System.Collections.Generic.IEnumerable - A collection of objects representing the redoable descriptions. ``` -------------------------------- ### UnDoManager Class Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Manages undo and redo operations using the command pattern. Allows for starting transactions, executing commands, and querying the state of undo/redo history. ```APIDOC ## UnDoManager Constructors ### Description Initializes an instance of the UnDoManager class. ### Method UnDoManager() UnDoManager(int) ### Endpoint Not applicable (SDK constructor) ## UnDoManager Properties ### Description Provides access to the undo/redo state and descriptions. ### Properties - **CanRedo** (boolean) - Returns a boolean to express if the Redo() method can be executed. - **CanUndo** (boolean) - Returns a boolean to express if the Undo() method can be executed. - **RedoDescriptions** (List) - Gets the descriptions in order of all the IUnDo which can be redone. - **UndoDescriptions** (List) - Gets the descriptions in order of all the IUnDo which can be undone. - **Version** (System.Int32) - Gets an integer representing the state of the IUnDoManager. ### Endpoint Not applicable (SDK properties) ## UnDoManager Methods ### Description Provides methods to control the undo/redo history, including starting transactions, executing operations, and clearing history. ### Methods - **BeginTransaction(object)**: Starts a group of operations and returns an IUnDoTransaction to stop the group. If Commit() is not called, all operations done during the transaction will be undone on System.IDisposable.Dispose(). - **Clear()**: Clears the history of IUnDo operations. - **Do(IUnDo)**: Executes the IUnDo command and stores it in the manager history. - **Redo()**: Redoes the last undone IUnDo command of the manager history. - **Undo()**: Undoes the last executed IUnDo command of the manager history. ### Endpoint Not applicable (SDK methods) ## UnDoManager Events ### Description Notifies when a property value changes. ### Event - **PropertyChanged**: Occurs when a property value changes. ### Endpoint Not applicable (SDK event) ``` -------------------------------- ### TryGetSingle(out T command) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md Gets the single T of this instance. Returns true if the instance contains exactly one T, otherwise false. ```APIDOC ## TryGetSingle(out T command) ### Description Attempts to retrieve a single command of type T from the GroupUnDo instance. This method is useful for checking if the group contains only one command of a specific type and retrieving it if so. ### Method ```csharp public bool TryGetSingle(out T command) where T : class, DefaultUnDo.IUnDo; ``` ### Parameters #### Type Parameters - `T`: The type of IUnDo to get. #### Output Parameters - `command` (T) - When this method returns, contains the single T of this instance if it was its only command; otherwise, the default value for the type T. This parameter is passed uninitialized. ### Returns (System.Boolean) - true if the current instance contains exactly one T; otherwise false. ``` -------------------------------- ### UnDoManager.RedoDescriptions Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/RedoDescriptions.md Gets the descriptions in order of all the IUnDo which can be redone. This property returns a collection of objects representing redoable descriptions. ```csharp public System.Collections.Generic.IEnumerable RedoDescriptions { get; } ``` -------------------------------- ### GroupUnDo.MergeDescriptionAction Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/index.md Gets the handler used to merge descriptions between GroupUnDo and IMergeableUnDo instances. ```csharp public MergeDescriptionHandler MergeDescriptionAction { get; } ``` -------------------------------- ### GroupUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md Initializes a GroupUnDo instance with a description and a span of IUnDo commands. Ensure the commands span does not contain null elements. ```csharp public GroupUnDo(object? description, scoped System.ReadOnlySpan commands); ``` -------------------------------- ### GroupUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/index.md Initializes a new instance of the GroupUnDo class with a description and a collection of IUnDo operations. ```csharp public GroupUnDo(object description, ReadOnlySpan operations) ``` -------------------------------- ### UnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDo/UnDo.md Initializes an UnDo instance with a description, a do action, and an undo action. Use this when you need to associate a descriptive text with the undoable operation. ```csharp public UnDo(object? description, System.Action? doAction, System.Action? undoAction); ``` -------------------------------- ### UnDo(object, Action, Action) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDo/UnDo.md Initializes an instance of UnDo with a description, a do action, and an undo action. ```APIDOC ## UnDo(object, Action, Action) Constructor ### Description Initializes an instance of [UnDo](index.md 'DefaultUnDo.UnDo') with a description, a do action, and an undo action. ### Parameters #### Parameters - **description** (System.Object) - The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') - **doAction** (System.Action) - The action called by [Do()](../IUnDo/Do().md 'DefaultUnDo.IUnDo.Do()'). - **undoAction** (System.Action) - The action called by [Undo()](../IUnDo/Undo().md 'DefaultUnDo.IUnDo.Undo()'). ``` -------------------------------- ### ValueUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/index.md Initializes an instance of ValueUnDo. ```APIDOC ## ValueUnDo Constructors ### ValueUnDo(object, Action, T, T) Initializes an instance of ValueUnDo. ### ValueUnDo(Action, T, T) Initializes an instance of ValueUnDo. ``` -------------------------------- ### ValueUnDo(object, Action, T, T) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md Initializes an instance of ValueUnDo with a description, a setter action, a new value, and an old value. ```APIDOC ## ValueUnDo(object, Action, T, T) Constructor Initializes an instance of [ValueUnDo](../index.md 'DefaultUnDo.ValueUnDo') ```csharp public ValueUnDo(object? description, System.Action setter, T newValue, T oldValue); ``` #### Parameters - **description** (System.Object) - The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') - **setter** (System.Action) - The action called to set the value. - **newValue** (T) - The new value. - **oldValue** (T) - The old value. #### Exceptions - System.ArgumentNullException - setter is null. ``` -------------------------------- ### GroupUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md Initializes a new instance of the GroupUnDo class with a description and a span of IUnDo commands. ```APIDOC ## GroupUnDo(object, ReadOnlySpan) Constructor ### Description Initializes a new instance of the [GroupUnDo](index.md 'DefaultUnDo.GroupUnDo') class. ### Parameters #### Parameters - **description** (System.Object) - The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') - **commands** (System.ReadOnlySpan) - The sequence of [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') contained by the instance. #### Exceptions - System.ArgumentException - 'commands' contains null elements. ``` -------------------------------- ### IUnDoManager.UndoDescriptions Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/UndoDescriptions.md Gets the descriptions in order of all the IUnDo which can be undone. ```APIDOC ## IUnDoManager.UndoDescriptions Property ### Description Gets the descriptions in order of all the IUnDo which can be undone. ### Property Value System.Collections.Generic.IEnumerable - An enumerable collection of objects representing undoable actions. ``` -------------------------------- ### ValueUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md Initializes a ValueUnDo instance with an optional description, a setter action, the new value, and the old value. The setter action is invoked to apply the value change. ```csharp public ValueUnDo(object? description, System.Action setter, T newValue, T oldValue); ``` -------------------------------- ### Basic Undo/Redo Manager Usage Source: https://github.com/doraku/defaultundo/blob/master/README.md Instantiate an UnDoManager and use its Do, Undo, Redo, and Clear methods to manage actions. Check CanUndo and CanRedo before performing operations. ```csharp IUnDoManager manager = new UnDoManager(); // do an action and record it in the manager, undoAction being the undo equivalent of the action manager.Do(doAction, undoAction); if (manager.CanUndo) { manager.Undo(); } if (Manager.CanRedo) { manager.Redo(); } // clean any recorded action manager.Clear(); ``` -------------------------------- ### IUnDoManager.Version Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/Version.md Gets an integer representing the state of the IUnDoManager. ```APIDOC ## IUnDoManager.Version Property ### Description Gets an integer representing the current state of the IUnDoManager. ### Property `Version` ### Return Value - **Version** (int) - An integer representing the state of the IUnDoManager. ``` -------------------------------- ### DictionaryUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md Initializes a new instance of DictionaryUnDo with an optional description. Use this constructor when you need to provide a descriptive label for the undoable operation. The 'isAdd' parameter determines if the operation is an add or remove action. ```csharp public DictionaryUnDo(object? description, System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); ``` -------------------------------- ### ListUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md Initializes a ListUnDo instance with a description, source list, index, item, and operation type. Use this when an explicit description for the undo operation is needed. ```csharp public ListUnDo(object? description, System.Collections.Generic.IList source, int index, T item, bool isAdd); ``` -------------------------------- ### DefaultUnDo.GroupUnDo.MergeDescriptionAction Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Gets the handler used to merge descriptions between GroupUnDo and IMergeableUnDo instances. ```APIDOC ## MergeDescriptionAction Property ### Description Gets the handler used to merge description between a GroupUnDo and a IMergeableUnDo instances. ### Method Property Access ### Endpoint N/A (Property access within the GroupUnDo class) ``` -------------------------------- ### Get IUnDoManager Version Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/Version.md Retrieves the current version of the IUnDoManager. This property is read-only. ```csharp int Version { get; } ``` -------------------------------- ### UnDo(Action, Action) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDo/UnDo.md Initializes an instance of UnDo with a do action and an undo action. ```APIDOC ## UnDo(Action, Action) Constructor ### Description Initializes an instance of [UnDo](index.md 'DefaultUnDo.UnDo') with a do action and an undo action. ### Parameters #### Parameters - **doAction** (System.Action) - The action called by [Do()](../IUnDo/Do().md 'DefaultUnDo.IUnDo.Do()'). - **undoAction** (System.Action) - The action called by [Undo()](../IUnDo/Undo().md 'DefaultUnDo.IUnDo.Undo()'). ``` -------------------------------- ### ValueUnDo(Action, T, T) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md Initializes an instance of ValueUnDo with a setter action, a new value, and an old value. ```APIDOC ## ValueUnDo(Action, T, T) Constructor Initialises an instance of [ValueUnDo](../index.md 'DefaultUnDo.ValueUnDo') ```csharp public ValueUnDo(System.Action setter, T newValue, T oldValue); ``` #### Parameters - **setter** (System.Action) - The action called to set the value. - **newValue** (T) - The new value. - **oldValue** (T) - The old value. #### Exceptions - System.ArgumentNullException - setter is null. ``` -------------------------------- ### CollectionUnDo Constructor with Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md Initializes a new instance of the CollectionUnDo class with a description, source collection, item, and operation type. Use this overload when you need to provide a descriptive label for the undo operation. ```csharp public CollectionUnDo(object? description, System.Collections.Generic.ICollection source, T item, bool isAdd); ``` -------------------------------- ### UnDoField.Value Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoField_T_/Value.md Gets or sets the value of the field, generating an IUnDo operation on set. ```APIDOC ## UnDoField.Value Property ### Description Gets or sets the value of the field. Setting the value generates an [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') operation. ### Property Value [T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') - The value of the field. ``` -------------------------------- ### ValueUnDo.MergeDescriptionHandler Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ```APIDOC ## ValueUnDo.MergeDescriptionHandler(object, object) ### Description Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ### Method Signature `public delegate object? ValueUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription);` ### Parameters #### oldDescription - **oldDescription** (object) - The description of the previous ValueUnDo merged. #### newDescription - **newDescription** (object) - The description of the new ValueUnDo merged. ### Returns - **object** - The merged description. ``` -------------------------------- ### GroupUnDo.MergeDescriptionHandler Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md Represents a method that will be called when merging a GroupUnDo and a IMergeableUnDo instances to get the resulting description. ```APIDOC ## GroupUnDo.MergeDescriptionHandler(object, object, object) ### Description Represents a method that will be called when merging a GroupUnDo and a IMergeableUnDo instances to get the resulting description. ### Method Signature `public delegate object GroupUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription, object? mergedDescription);` ### Parameters #### Parameters - **oldDescription** (System.Object) - The description of the previous GroupUnDo merged. - **newDescription** (System.Object) - The description of the new IMergeableUnDo merged. - **mergedDescription** (System.Object) - The description of the new resulting IMergeableUnDo merged. ### Returns - **System.Object** - The final description to use. ``` -------------------------------- ### Basic Undo/Redo Operation Source: https://github.com/doraku/defaultundo/blob/master/README.md Demonstrates a simple undo and redo operation using the IUnDoManager. ```csharp manager.Redo(); ``` -------------------------------- ### CollectionUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/index.md Initializes an instance of the CollectionUnDo class. ```APIDOC ## CollectionUnDo Constructors ### Description Initializes an instance of the CollectionUnDo class. ### Constructors - **CollectionUnDo(object, ICollection, T, bool)**: Initializes an instance of CollectionUnDo. - **CollectionUnDo(ICollection, T, bool)**: Initializes an instance of CollectionUnDo. ``` -------------------------------- ### ValueUnDo.MergeInterval Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo/MergeInterval.md Gets or sets the TimeSpan interval that ValueUnDo instances should respect to be mergeable. The default value is 500ms. ```APIDOC ## ValueUnDo.MergeInterval Property ### Description Gets or sets the `System.TimeSpan` interval that `ValueUnDo` instances should respect to be mergeable. This property determines the time window within which consecutive undo operations can be merged into a single undo action. ### Property Value `System.TimeSpan` - The interval for merging undo operations. The default value is 500 milliseconds. ``` -------------------------------- ### DictionaryUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md Initializes a new instance of the DictionaryUnDo class. ```APIDOC ## DictionaryUnDo Constructors ### Description Initializes a new instance of the DictionaryUnDo class. ### Constructors - **DictionaryUnDo(object, IDictionary, TKey, TValue, bool)**: Initializes an instance of DictionaryUnDo. - **DictionaryUnDo(IDictionary, TKey, TValue, bool)**: Initializes an instance of DictionaryUnDo. ``` -------------------------------- ### ValueUnDo.MergeInterval Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo/MergeInterval.md Gets or sets the TimeSpan interval for merging ValueUnDo instances. The default value is 500ms. ```csharp public static System.TimeSpan MergeInterval { get; set; } ``` -------------------------------- ### DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ```APIDOC ## DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object) ### Description Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ### Method Delegate ### Parameters This method takes two object parameters, representing the values to be merged for description. ### Response This delegate is expected to return a description of the merged value. ``` -------------------------------- ### GroupUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md Initializes a new instance of the GroupUnDo class with a span of IUnDo commands. ```APIDOC ## GroupUnDo(ReadOnlySpan) Constructor ### Description Initializes a new instance of the [GroupUnDo](index.md 'DefaultUnDo.GroupUnDo') class. ### Parameters #### Parameters - **commands** (System.ReadOnlySpan) - The sequence of [IUnDo](../IUnDo/index.md 'DefaultUnDo.IUnDo') contained by the instance. #### Exceptions - System.ArgumentNullException - 'commands' is null. - System.ArgumentException - 'commands' contains null elements. ``` -------------------------------- ### DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ```APIDOC ## DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T) ### Description Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ### Method Delegate ### Parameters This method takes four parameters: two objects and two of type T, representing the values to be merged for description. ### Response This delegate is expected to return a description of the merged value. ``` -------------------------------- ### ValueUnDo.MergeInterval Property Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeInterval.md Gets or sets the TimeSpan interval for merging ValueUnDo instances. If not set, the default MergeInterval will be used. ```csharp public static System.Nullable MergeInterval { get; set; } ``` -------------------------------- ### BeginTransaction Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/BeginTransaction(object).md This is the signature for the BeginTransaction method. It takes an optional object description and returns an IUnDoTransaction. ```csharp public DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); ``` -------------------------------- ### GroupUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/index.md Initializes a new instance of the GroupUnDo class with a collection of IUnDo operations. ```csharp public GroupUnDo(ReadOnlySpan operations) ``` -------------------------------- ### CollectionUnDo(object, ICollection, T, bool) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md Initializes an instance of CollectionUnDo with a description, source collection, item, and operation type. ```APIDOC ## CollectionUnDo(object, ICollection, T, bool) ### Description Initializes an instance of CollectionUnDo. ### Method Constructor ### Parameters #### Path Parameters - **description** (object) - The description of this IUnDo. - **source** (ICollection) - The ICollection on which to perform operation. - **item** (T) - The argument of the operation. - **isAdd** (bool) - true if the operation is an ICollection.Add(@0), false for a ICollection.Remove(@0). #### Exceptions - **ArgumentNullException**: source is null. ``` -------------------------------- ### Get Undo Descriptions Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/UndoDescriptions.md Retrieves an enumerable collection of objects representing the descriptions of undoable actions managed by the IUnDoManager. This property is read-only. ```csharp System.Collections.Generic.IEnumerable UndoDescriptions { get; } ``` -------------------------------- ### GroupUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md Initializes a GroupUnDo instance with a span of IUnDo commands. The commands span must not be null and should not contain null elements. ```csharp public GroupUnDo(scoped System.ReadOnlySpan commands); ``` -------------------------------- ### IUnDoManager.BeginTransaction(object) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/BeginTransaction(object).md Starts a group of operations and returns an IUnDoTransaction to stop the group. If Commit() is not called, all operations done during the transaction will be undone on System.IDisposable.Dispose. ```APIDOC ## IUnDoManager.BeginTransaction(object) ### Description Starts a group of operations and returns an IUnDoTransaction to manage the transaction. If Commit() is not called, all operations done during the transaction will be undone on System.IDisposable.Dispose. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example usage: // IUnDoTransaction transaction = undoManager.BeginTransaction("Perform some operations"); // try // { // // Perform operations... // transaction.Commit(); // } // catch // { // // Transaction will be automatically rolled back by Dispose if not committed // } ``` ### Response #### Success Response - **IUnDoTransaction** - An IUnDoTransaction to commit or rollback the transaction of operations. #### Response Example ```csharp // The return type is an object implementing IUnDoTransaction ``` #### Parameters - **description** (System.Object) - Optional - The description of the group of operations. ``` -------------------------------- ### UnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDo/UnDo.md Initializes an UnDo instance with only a do action and an undo action. This is suitable for operations where a textual description is not necessary. ```csharp public UnDo(System.Action? doAction, System.Action? undoAction); ``` -------------------------------- ### Redo() Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/Redo().md This is the signature for the Redo() method. It does not take any parameters and returns void. ```csharp void Redo(); ``` -------------------------------- ### UnDoField.Value Property Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoField_T_/Value.md This is the C# signature for the Value property of the UnDoField class. It indicates that the property is public, can be accessed for getting and setting, and is generic with type T. ```csharp public T Value { get; set; } ``` -------------------------------- ### ListUnDo(object, IList, int, T, bool) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md Initializes an instance of ListUnDo with a description, source list, index, item, and a boolean indicating if it's an add operation. ```APIDOC ## ListUnDo(object, IList, int, T, bool) ### Description Initializes an instance of ListUnDo. ### Method Constructor ### Parameters #### Parameters - **description** (System.Object) - Description of this IUnDo. - **source** (System.Collections.Generic.IList) - The IList on which the operation is performed. - **index** (System.Int32) - The index of the operation. - **item** (T) - The argument of the operation. - **isAdd** (System.Boolean) - true if the operation is an IList.IndexOf(@0), else false for a IList.RemoveAt(System.Int32). #### Exceptions - **System.ArgumentNullException**: source is null. ``` -------------------------------- ### C# IUnDoManager.BeginTransaction Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/BeginTransaction(object).md This is the method signature for BeginTransaction. It starts a group of operations and returns an IUnDoTransaction to manage the group. If Commit() is not called, operations are undone on Dispose. ```csharp DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); ``` -------------------------------- ### ValueUnDo.MergeDescriptionHandler Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. It takes the old and new descriptions and values, and returns the merged description. ```APIDOC ## ValueUnDo.MergeDescriptionHandler(object, T, object, T) ### Description Represents a method that will be called when merging two ValueUnDo instances to get the resulting description. ### Method Signature `delegate object ValueUnDo.MergeDescriptionHandler(object? oldDescription, T oldValue, object? newDescription, T newValue);` ### Parameters #### Parameters - **oldDescription** (System.Object) - The description of the previous ValueUnDo merged. - **oldValue** (T) - The old value used when undoing the resulting merged ValueUnDo. - **newDescription** (System.Object) - The description of the new ValueUnDo merged. - **newValue** (T) - The new value used when redoing the resulting merged ValueUnDo. ### Returns - **System.Object** - The new description that will be using for the resulting merged ValueUnDo. ``` -------------------------------- ### Default UnDoManager Constructor Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md Initializes an instance of UnDoManager with default settings. Use this when no specific capacity limit is required. ```csharp public UnDoManager(); ``` -------------------------------- ### DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Undo Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Executes the defined redo action. ```APIDOC ## DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Undo() ### Description Executes the action defined for the Undo operation. ### Method Method ``` -------------------------------- ### ValueUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Initializes an instance of ValueUnDo, which provides an implementation of the IUnDo interface for setting values. ```APIDOC ## ValueUnDo Constructors ### Description Initializes an instance of ValueUnDo. ### Constructors - **ValueUnDo(object, Action, T, T)** - **ValueUnDo(Action, T, T)** ``` -------------------------------- ### Execute and Store IUnDo Command Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManager/Do(IUnDo).md Use this method to execute an IUnDo command and have it recorded in the manager's history. Ensure the command object is not null to avoid an ArgumentNullException. ```csharp void Do(DefaultUnDo.IUnDo command); ``` -------------------------------- ### C# - DoInsert Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md This is the signature for the DoInsert method. It takes an IUnDoManager, a generic IList, an index, the item to insert, and an optional description. ```csharp public static void DoInsert(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, T item, object? description=null); ``` -------------------------------- ### DictionaryUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Initializes an instance of DictionaryUnDo, which implements the IUnDo interface for IDictionary operations. ```APIDOC ## DictionaryUnDo Constructors ### Description Initializes an instance of DictionaryUnDo, which implements the IUnDo interface for IDictionary operations. ### Constructors - **DictionaryUnDo(object, IDictionary, TKey, TValue, bool)**: Initializes an instance of DictionaryUnDo. - **DictionaryUnDo(IDictionary, TKey, TValue, bool)**: Initializes an instance of DictionaryUnDo. ``` -------------------------------- ### DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Do Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Executes the defined undo action. ```APIDOC ## DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Do() ### Description Executes the action defined for the Do operation. ### Method Method ``` -------------------------------- ### ListUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md Initializes a ListUnDo instance with the source list, index, item, and operation type. Use this for simpler undo operations where a separate description is not required. ```csharp public ListUnDo(System.Collections.Generic.IList source, int index, T item, bool isAdd); ``` -------------------------------- ### DefaultUnDo.UnDo Constructor Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Initializes a new instance of the UnDo class for basic undo/redo actions. ```APIDOC ## DefaultUnDo.UnDo.#ctor(System.Object,System.Action,System.Action) ### Description Constructs an UnDo object with an owner and specific actions for undo and redo. ### Method Constructor ### Parameters * **owner** (object) - Required - The owner of the undo operation. * **doAction** (Action) - Required - The action to perform when Do() is called. * **undoAction** (Action) - Required - The action to perform when Undo() is called. ``` ```APIDOC ## DefaultUnDo.UnDo.#ctor(System.Action,System.Action) ### Description Constructs an UnDo object with specific actions for undo and redo. ### Method Constructor ### Parameters * **doAction** (Action) - Required - The action to perform when Do() is called. * **undoAction** (Action) - Required - The action to perform when Undo() is called. ``` -------------------------------- ### ValueUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md Initializes a ValueUnDo instance with a setter action, the new value, and the old value. This overload is used when no specific description is needed for the undo operation. ```csharp public ValueUnDo(System.Action setter, T newValue, T oldValue); ``` -------------------------------- ### GroupUnDo Constructors Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/index.md Initializes a new instance of the GroupUnDo class. ```APIDOC ## GroupUnDo(object, ReadOnlySpan) ### Description Initializes an instance of GroupUnDo with a description and a span of IUnDo operations. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## GroupUnDo(ReadOnlySpan) ### Description Initializes an instance of GroupUnDo with a span of IUnDo operations. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### IUnDo Interface Methods Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IUnDo/index.md This section details the methods available in the IUnDo interface. ```APIDOC ## IUnDo Interface ### Description Provides methods to execute an action and remove its effect. ### Methods #### Do() ##### Description Does an action. ##### Method (Implicitly called by the system or user) #### Undo() ##### Description Does the opposite of the Do() action. ##### Method (Implicitly called by the system or user) ### Properties #### Description ##### Description Gets a description of what this IUnDo perform. ##### Property Type string ``` -------------------------------- ### CollectionUnDo(ICollection, T, bool) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md Initializes an instance of CollectionUnDo with a source collection, item, and operation type. ```APIDOC ## CollectionUnDo(ICollection, T, bool) ### Description Initializes an instance of CollectionUnDo. ### Method Constructor ### Parameters #### Path Parameters - **source** (ICollection) - The ICollection on which to perform operation. - **item** (T) - The argument of the operation. - **isAdd** (bool) - true if the operation is an ICollection.Add(@0), false for a ICollection.Remove(@0). #### Exceptions - **ArgumentNullException**: source is null. ``` -------------------------------- ### DefaultUnDo.IUnDo.Do() Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md This snippet shows the method signature for DefaultUnDo.IUnDo.Do(). It is a void method that performs an action. ```csharp void DefaultUnDo.IUnDo.Do(); ``` -------------------------------- ### DictionaryUnDo Constructor Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md Initializes an instance of DictionaryUnDo. Use this constructor to set up an undoable operation on a dictionary. ```csharp public DictionaryUnDo(System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); ``` -------------------------------- ### DefaultUnDo.IUnDo.Do() Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md Performs an action. This method is part of the IUnDo interface. ```APIDOC ## DefaultUnDo.IUnDo.Do() ### Description Does an action. ### Method void ### Signature void DefaultUnDo.IUnDo.Do() ``` -------------------------------- ### DefaultUnDo.IUnDo.Do() Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md Executes an action. This method is part of the IUnDo interface and is implemented by the DefaultUnDo class. ```APIDOC ## DefaultUnDo.IUnDo.Do() ### Description Does an action. ### Method void ### Endpoint N/A (SDK Method) ### Implements [Do()](../IUnDo/Do().md 'DefaultUnDo.IUnDo.Do()') ``` -------------------------------- ### ListUnDo(IList, int, T, bool) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md Initializes an instance of ListUnDo with a source list, index, item, and a boolean indicating if it's an add operation. ```APIDOC ## ListUnDo(IList, int, T, bool) ### Description Initializes an instance of ListUnDo. ### Method Constructor ### Parameters #### Parameters - **source** (System.Collections.Generic.IList) - The IList on which the operation is performed. - **index** (System.Int32) - The index of the operation. - **item** (T) - The argument of the operation. - **isAdd** (System.Boolean) - true if the operation is an IList.IndexOf(@0), else false for a IList.RemoveAt(System.Int32). #### Exceptions - **System.ArgumentNullException**: source is null. ``` -------------------------------- ### Do Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Sets a value as an IUnDo operation. ```APIDOC ## Do ### Description Sets a value as a IUnDo operation. ### Method `Method` ### Endpoint `DefaultUnDo/IUnDoManagerExtensions/Do` ### Parameters #### Path Parameters - **this IUnDoManager** (IUnDoManager) - Required - The undo manager. - **Action** (Action) - Required - The action to perform. - **T** (T) - Required - The value to set. - **T** (T) - Required - The value to undo. - **object** (object) - Optional - A state object. ### Response #### Success Response - Completes the undo/redo operation. ``` -------------------------------- ### UnDoManager() Constructor Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md Initializes a new instance of the UnDoManager class with default capacity. ```APIDOC ## UnDoManager() ### Description Initializes a new instance of the UnDoManager class. ### Method Constructor ### Endpoint N/A ### Parameters None ### Request Example None ### Response Initializes an UnDoManager object. ``` -------------------------------- ### ISetExtensions.AsUnDo Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Converts an ISet to an IUnDo operation manager. ```APIDOC ## DefaultUnDo.ISetExtensions.AsUnDo ### Description Converts an ISet to an IUnDo operation manager, allowing for undo/redo operations on the set. ### Method Invoke ### Endpoint N/A ### Parameters - **this ISet** (ISet) - Required - The set to convert. - **IUnDoManager** (IUnDoManager) - Required - The undo manager to use. - **Func** (Func) - Required - A function to handle collection operations. ### Request Example N/A ### Response #### Success Response - **IUnDo** (IUnDo) - The undo operation manager for the set. #### Response Example N/A ``` -------------------------------- ### DictionaryUnDo IUnDo Methods Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Provides explicit interface implementations for the IUnDo interface methods (Description, Do, Undo) for the DictionaryUnDo class. ```APIDOC ## DictionaryUnDo IUnDo Methods ### Description Provides explicit interface implementations for the IUnDo interface methods (Description, Do, Undo) for the DictionaryUnDo class. ### Methods - **DefaultUnDo.IUnDo.Description**: Gets a description of what this IUnDo performs. - **DefaultUnDo.IUnDo.Do()**: Performs an action. - **DefaultUnDo.IUnDo.Undo()**: Performs the opposite of the Do() action. ``` -------------------------------- ### IListExtensions.AsUnDo Method Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md This is the signature for the AsUnDo extension method. It takes an IList, an IUnDoManager, and an optional description factory as parameters. ```csharp public static System.Collections.Generic.IList AsUnDo(this System.Collections.Generic.IList source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); ``` -------------------------------- ### DefaultUnDo.GroupUnDo.Do() (Explicit Interface Implementation) Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Executes the action represented by this IUnDo operation. ```APIDOC ## DefaultUnDo.IUnDo.Do() Method ### Description Performs the action. ### Method Explicit Interface Implementation ### Endpoint N/A (Method call within the GroupUnDo class) ``` -------------------------------- ### UnDoManager(int maxCapacity) Constructor Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md Initializes a new instance of the UnDoManager class with a specified maximum capacity for undo operations. ```APIDOC ## UnDoManager(int maxCapacity) ### Description Initializes a new instance of the UnDoManager class with a specified maximum capacity. ### Method Constructor ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### `maxCapacity` - **maxCapacity** (System.Int32) - Required - The maximum number of operations this UnDoManager can record before erasing the oldest ones. ### Request Example None ### Response Initializes an UnDoManager object with the specified capacity. ``` -------------------------------- ### Do(this IUnDoManager, Action, Action, object) Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Records a compound undo/redo operation consisting of a do action and an undo action. ```APIDOC ## Do(this IUnDoManager, Action, Action, object) ### Description Records a compound undo/redo operation consisting of a do action and an undo action. ### Method Not specified (extension method) ### Endpoint Not applicable (extension method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### UnDoCollectionOperation Constructor Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md Initializes a new instance of the UnDoCollectionOperation class. Use this to provide details about an upcoming operation on an undo collection, including the collection itself, the action to be performed, and any associated parameters. ```csharp public UnDoCollectionOperation(object Collection, DefaultUnDo.UnDoCollectionAction Action, params object?[] Parameters); ``` -------------------------------- ### ValueUnDo.MergeDescriptionHandler Delegate Signature Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md This is the signature for the ValueUnDo.MergeDescriptionHandler delegate. It takes two object parameters, representing the old and new descriptions, and returns an object representing the merged description. ```csharp public delegate object? ValueUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription); ``` -------------------------------- ### UnDoField Constructor with Initial Value and Description Factory Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/UnDoField_T_/UnDoField_T_.md Creates an UnDoField instance with an initial value, an IUnDoManager, and an optional factory for generating descriptions of undo operations. The manager parameter is mandatory. ```csharp public UnDoField(DefaultUnDo.IUnDoManager manager, T value, System.Func,object?>? descriptionFactory=null); ``` -------------------------------- ### CollectionUnDo Constructor without Description Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md Initializes a new instance of the CollectionUnDo class with a source collection, item, and operation type. This overload is suitable when a descriptive label for the undo operation is not required. ```csharp public CollectionUnDo(System.Collections.Generic.ICollection source, T item, bool isAdd); ``` -------------------------------- ### Do Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/index.md Sets the element with the specified key on an IDictionary as an IUnDo operation. ```APIDOC ## Do ### Description Sets the element with the specified key on an IDictionary as an IUnDo operation. ### Method `Method` ### Endpoint `DefaultUnDo/IUnDoManagerExtensions/Do` ### Parameters #### Path Parameters - **this IUnDoManager** (IUnDoManager) - Required - The undo manager. - **IDictionary** (IDictionary) - Required - The dictionary to modify. - **TKey** (TKey) - Required - The key of the element to set. - **TValue** (TValue) - Required - The new value for the element. - **object** (object) - Optional - A state object. ### Response #### Success Response - Completes the undo/redo operation. ``` -------------------------------- ### DefaultUnDo.GroupUnDo.TryGetSingle Source: https://github.com/doraku/defaultundo/blob/master/documentation/DefaultUnDo.txt Attempts to retrieve a single IUnDo operation from the group if it contains only one. ```APIDOC ## DefaultUnDo.GroupUnDo.TryGetSingle(T@) ### Description Attempts to extract a single IUnDo operation from the group. Returns true if the group contains exactly one operation and it is of type T, otherwise returns false. ### Method Method ### Parameters * **@** (T) - Required - Output parameter to store the single operation if successful. ``` -------------------------------- ### DefaultUnDo.IUnDo.Do() Source: https://github.com/doraku/defaultundo/blob/master/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md The Do() method is part of the IUnDo interface and is used to perform an action. It is implemented by the DefaultUnDo class. ```APIDOC ## DefaultUnDo.IUnDo.Do() ### Description Performs an action. This method is part of the IUnDo interface. ### Method void ### Signature void DefaultUnDo.IUnDo.Do() ### Implements [Do](../IUnDo/Do().md 'DefaultUnDo.IUnDo.Do()') ```