diff --git a/documentation/DefaultUnDo.txt b/documentation/DefaultUnDo.txt index f5d1003..da88396 100644 --- a/documentation/DefaultUnDo.txt +++ b/documentation/DefaultUnDo.txt @@ -1,140 +1,150 @@ https://github.com/Doraku/DefaultUnDo/blob/master/documentation/api/ -P:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Description|CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.CollectionUnDo`1.#ctor(System.Object,System.Collections.Generic.ICollection{`0},`0,System.Boolean)|CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md|CollectionUnDo(object, ICollection, T, bool) -M:DefaultUnDo.CollectionUnDo`1.#ctor(System.Collections.Generic.ICollection{`0},`0,System.Boolean)|CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md|CollectionUnDo(ICollection, T, bool) -M:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Undo|CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -M:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Do|CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -N:DefaultUnDo|DefaultUnDo.md#DefaultUnDo|DefaultUnDo -T:DefaultUnDo.CollectionUnDo`1|CollectionUnDo_T_.md|CollectionUnDo -P:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Description|DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.DictionaryUnDo`2.#ctor(System.Object,System.Collections.Generic.IDictionary{`0,`1},`0,`1,System.Boolean)|DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md|DictionaryUnDo(object, IDictionary, TKey, TValue, bool) -M:DefaultUnDo.DictionaryUnDo`2.#ctor(System.Collections.Generic.IDictionary{`0,`1},`0,`1,System.Boolean)|DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md|DictionaryUnDo(IDictionary, TKey, TValue, bool) -M:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Do|DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -M:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Undo|DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -T:DefaultUnDo.DictionaryUnDo`2|DictionaryUnDo_TKey,TValue_.md|DictionaryUnDo -P:DefaultUnDo.GroupUnDo.MergeDescriptionAction|GroupUnDo.MergeDescriptionAction.md|MergeDescriptionAction -P:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Description|GroupUnDo.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.GroupUnDo.#ctor(System.Object,DefaultUnDo.IUnDo[])|GroupUnDo.GroupUnDo(object,IUnDo[]).md|GroupUnDo(object, IUnDo[]) -M:DefaultUnDo.GroupUnDo.#ctor(DefaultUnDo.IUnDo[])|GroupUnDo.GroupUnDo(IUnDo[]).md|GroupUnDo(IUnDo[]) -M:DefaultUnDo.GroupUnDo.TryGetSingle``1(``0@)|GroupUnDo.TryGetSingle_T_(T).md|TryGetSingle(T) -M:DefaultUnDo.GroupUnDo.DefaultUnDo#IMergeableUnDo#TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md|DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) -M:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Do|GroupUnDo.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -M:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Undo|GroupUnDo.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -T:DefaultUnDo.GroupUnDo|GroupUnDo.md|GroupUnDo -M:DefaultUnDo.ICollectionExtension.AsUnDo``1(System.Collections.Generic.ICollection{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this ICollection, IUnDoManager, Func) -T:DefaultUnDo.ICollectionExtension|ICollectionExtension.md|ICollectionExtension -M:DefaultUnDo.IDictionaryExtension.AsUnDo``2(System.Collections.Generic.IDictionary{``0,``1},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this IDictionary, IUnDoManager, Func) -T:DefaultUnDo.IDictionaryExtension|IDictionaryExtension.md|IDictionaryExtension -M:DefaultUnDo.IListExtension.AsUnDo``1(System.Collections.Generic.IList{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this IList, IUnDoManager, Func) -M:DefaultUnDo.IListExtension.Move``1(System.Collections.Generic.IList{``0},System.Int32,System.Int32)|IListExtension.Move_T_(thisIList_T_,int,int).md|Move(this IList, int, int) -T:DefaultUnDo.IListExtension|IListExtension.md|IListExtension -M:DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|IMergeableUnDo.TryMerge(IUnDo,IUnDo).md|TryMerge(IUnDo, IUnDo) -T:DefaultUnDo.IMergeableUnDo|IMergeableUnDo.md|IMergeableUnDo -M:DefaultUnDo.ISetExtension.AsUnDo``1(System.Collections.Generic.ISet{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this ISet, IUnDoManager, Func) -T:DefaultUnDo.ISetExtension|ISetExtension.md|ISetExtension -P:DefaultUnDo.IUnDo.Description|IUnDo.Description.md|Description -M:DefaultUnDo.IUnDo.Do|IUnDo.Do().md|Do() -M:DefaultUnDo.IUnDo.Undo|IUnDo.Undo().md|Undo() -T:DefaultUnDo.IUnDo|IUnDo.md|IUnDo -P:DefaultUnDo.IUnDoManager.Version|IUnDoManager.Version.md|Version -P:DefaultUnDo.IUnDoManager.CanUndo|IUnDoManager.CanUndo.md|CanUndo -P:DefaultUnDo.IUnDoManager.CanRedo|IUnDoManager.CanRedo.md|CanRedo -P:DefaultUnDo.IUnDoManager.UndoDescriptions|IUnDoManager.UndoDescriptions.md|UndoDescriptions -P:DefaultUnDo.IUnDoManager.RedoDescriptions|IUnDoManager.RedoDescriptions.md|RedoDescriptions -M:DefaultUnDo.IUnDoManager.BeginTransaction(System.Object)|IUnDoManager.BeginTransaction(object).md|BeginTransaction(object) -M:DefaultUnDo.IUnDoManager.Clear|IUnDoManager.Clear().md|Clear() -M:DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo)|IUnDoManager.Do(IUnDo).md|Do(IUnDo) -M:DefaultUnDo.IUnDoManager.Redo|IUnDoManager.Redo().md|Redo() -M:DefaultUnDo.IUnDoManager.Undo|IUnDoManager.Undo().md|Undo() -T:DefaultUnDo.IUnDoManager|IUnDoManager.md|IUnDoManager -M:DefaultUnDo.IUnDoManagerExtension.DoAdd``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ISet{``0},``0,System.Object)|IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md|DoAdd(this IUnDoManager, ISet, T, object) -M:DefaultUnDo.IUnDoManagerExtension.DoAdd``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},``0,System.Object)|IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md|DoAdd(this IUnDoManager, ICollection, T, object) -M:DefaultUnDo.IUnDoManagerExtension.DoClear``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},System.Object)|IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md|DoClear(this IUnDoManager, ICollection, object) -M:DefaultUnDo.IUnDoManagerExtension.DoRemove``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},``0,System.Object)|IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md|DoRemove(this IUnDoManager, ICollection, T, object) -M:DefaultUnDo.IUnDoManagerExtension.DoAdd``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,``1,System.Object)|IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md|DoAdd(this IUnDoManager, IDictionary, TKey, TValue, object) -M:DefaultUnDo.IUnDoManagerExtension.DoRemove``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,System.Object)|IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md|DoRemove(this IUnDoManager, IDictionary, TKey, object) -M:DefaultUnDo.IUnDoManagerExtension.Do``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,``1,System.Object)|IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md|Do(this IUnDoManager, IDictionary, TKey, TValue, object) -M:DefaultUnDo.IUnDoManagerExtension.DoInsert``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,``0,System.Object)|IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md|DoInsert(this IUnDoManager, IList, int, T, object) -M:DefaultUnDo.IUnDoManagerExtension.DoRemoveAt``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,System.Object)|IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md|DoRemoveAt(this IUnDoManager, IList, int, object) -M:DefaultUnDo.IUnDoManagerExtension.Do``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,``0,System.Object)|IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md|Do(this IUnDoManager, IList, int, T, object) -M:DefaultUnDo.IUnDoManagerExtension.Do(DefaultUnDo.IUnDoManager,System.Action,System.Action,System.Object)|IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md|Do(this IUnDoManager, Action, Action, object) -M:DefaultUnDo.IUnDoManagerExtension.DoOnDo(DefaultUnDo.IUnDoManager,System.Action,System.Object)|IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md|DoOnDo(this IUnDoManager, Action, object) -M:DefaultUnDo.IUnDoManagerExtension.DoOnUndo(DefaultUnDo.IUnDoManager,System.Action,System.Object)|IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md|DoOnUndo(this IUnDoManager, Action, object) -M:DefaultUnDo.IUnDoManagerExtension.Do``1(DefaultUnDo.IUnDoManager,System.Action{``0},``0,``0,System.Object)|IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md|Do(this IUnDoManager, Action, T, T, object) -T:DefaultUnDo.IUnDoManagerExtension|IUnDoManagerExtension.md|IUnDoManagerExtension -M:DefaultUnDo.IUnDoTransaction.Commit|IUnDoTransaction.Commit().md|Commit() -T:DefaultUnDo.IUnDoTransaction|IUnDoTransaction.md|IUnDoTransaction -P:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Description|ListUnDo_T_.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.ListUnDo`1.#ctor(System.Object,System.Collections.Generic.IList{`0},System.Int32,`0,System.Boolean)|ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md|ListUnDo(object, IList, int, T, bool) -M:DefaultUnDo.ListUnDo`1.#ctor(System.Collections.Generic.IList{`0},System.Int32,`0,System.Boolean)|ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md|ListUnDo(IList, int, T, bool) -M:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Do|ListUnDo_T_.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -M:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Undo|ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -T:DefaultUnDo.ListUnDo`1|ListUnDo_T_.md|ListUnDo -P:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Description|UnDo.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.UnDo.#ctor(System.Object,System.Action,System.Action)|UnDo.UnDo(object,Action,Action).md|UnDo(object, Action, Action) -M:DefaultUnDo.UnDo.#ctor(System.Action,System.Action)|UnDo.UnDo(Action,Action).md|UnDo(Action, Action) -M:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Do|UnDo.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -M:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Undo|UnDo.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -T:DefaultUnDo.UnDo|UnDo.md|UnDo -F:DefaultUnDo.UnDoCollectionAction.ICollectionAdd|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionAdd|ICollectionAdd -F:DefaultUnDo.UnDoCollectionAction.ICollectionRemove|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionRemove|ICollectionRemove -F:DefaultUnDo.UnDoCollectionAction.ICollectionClear|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionClear|ICollectionClear -F:DefaultUnDo.UnDoCollectionAction.ISetAdd|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetAdd|ISetAdd -F:DefaultUnDo.UnDoCollectionAction.ISetExceptWith|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetExceptWith|ISetExceptWith -F:DefaultUnDo.UnDoCollectionAction.ISetIntersectWith|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetIntersectWith|ISetIntersectWith -F:DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith|ISetSymmetricExceptWith -F:DefaultUnDo.UnDoCollectionAction.ISetUnionWith|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetUnionWith|ISetUnionWith -F:DefaultUnDo.UnDoCollectionAction.IListMove|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListMove|IListMove -F:DefaultUnDo.UnDoCollectionAction.IListInsert|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListInsert|IListInsert -F:DefaultUnDo.UnDoCollectionAction.IListRemoveAt|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListRemoveAt|IListRemoveAt -F:DefaultUnDo.UnDoCollectionAction.IListIndexer|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListIndexer|IListIndexer -F:DefaultUnDo.UnDoCollectionAction.IDictionaryAdd|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryAdd|IDictionaryAdd -F:DefaultUnDo.UnDoCollectionAction.IDictionaryRemove|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryRemove|IDictionaryRemove -F:DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer|UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer|IDictionaryIndexer -T:DefaultUnDo.UnDoCollectionAction|UnDoCollectionAction.md|UnDoCollectionAction -P:DefaultUnDo.UnDoCollectionOperation.Collection|UnDoCollectionOperation.Collection.md|Collection -P:DefaultUnDo.UnDoCollectionOperation.Action|UnDoCollectionOperation.Action.md|Action -P:DefaultUnDo.UnDoCollectionOperation.Parameters|UnDoCollectionOperation.Parameters.md|Parameters -M:DefaultUnDo.UnDoCollectionOperation.#ctor(System.Object,DefaultUnDo.UnDoCollectionAction,System.Object[])|UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md|UnDoCollectionOperation(object, UnDoCollectionAction, object[]) -T:DefaultUnDo.UnDoCollectionOperation|UnDoCollectionOperation.md|UnDoCollectionOperation -P:DefaultUnDo.UnDoField`1.Value|UnDoField_T_.Value.md|Value -M:DefaultUnDo.UnDoField`1.#ctor(DefaultUnDo.IUnDoManager,`0,System.Func{DefaultUnDo.UnDoFieldChange{`0},System.Object})|UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md|UnDoField(IUnDoManager, T, Func,object>) -M:DefaultUnDo.UnDoField`1.#ctor(DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoFieldChange{`0},System.Object})|UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md|UnDoField(IUnDoManager, Func,object>) -M:DefaultUnDo.UnDoField`1.PreSet(`0)|UnDoField_T_.PreSet(T).md|PreSet(T) -M:DefaultUnDo.UnDoField`1.PostSet(`0)|UnDoField_T_.PostSet(T).md|PostSet(T) -M:DefaultUnDo.UnDoField`1.op_Implicit(DefaultUnDo.UnDoField{`0})~`0|UnDoField_T_.implicitoperatorT(UnDoField_T_).md|implicit operator T(UnDoField) -M:DefaultUnDo.UnDoField`1.ToT|UnDoField_T_.ToT().md|ToT() -T:DefaultUnDo.UnDoField`1|UnDoField_T_.md|UnDoField -P:DefaultUnDo.UnDoFieldChange`1.OldValue|UnDoFieldChange_T_.OldValue.md|OldValue -P:DefaultUnDo.UnDoFieldChange`1.NewValue|UnDoFieldChange_T_.NewValue.md|NewValue -M:DefaultUnDo.UnDoFieldChange`1.#ctor(`0,`0)|UnDoFieldChange_T_.UnDoFieldChange(T,T).md|UnDoFieldChange(T, T) -T:DefaultUnDo.UnDoFieldChange`1|UnDoFieldChange_T_.md|UnDoFieldChange -P:DefaultUnDo.UnDoManager.Version|UnDoManager.Version.md|Version -P:DefaultUnDo.UnDoManager.CanUndo|UnDoManager.CanUndo.md|CanUndo -P:DefaultUnDo.UnDoManager.CanRedo|UnDoManager.CanRedo.md|CanRedo -P:DefaultUnDo.UnDoManager.UndoDescriptions|UnDoManager.UndoDescriptions.md|UndoDescriptions -P:DefaultUnDo.UnDoManager.RedoDescriptions|UnDoManager.RedoDescriptions.md|RedoDescriptions -M:DefaultUnDo.UnDoManager.#ctor(System.Int32)|UnDoManager.UnDoManager(int).md|UnDoManager(int) -M:DefaultUnDo.UnDoManager.#ctor|UnDoManager.UnDoManager().md|UnDoManager() -M:DefaultUnDo.UnDoManager.BeginTransaction(System.Object)|UnDoManager.BeginTransaction(object).md|BeginTransaction(object) -M:DefaultUnDo.UnDoManager.Clear|UnDoManager.Clear().md|Clear() -M:DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo)|UnDoManager.Do(IUnDo).md|Do(IUnDo) -M:DefaultUnDo.UnDoManager.Undo|UnDoManager.Undo().md|Undo() -M:DefaultUnDo.UnDoManager.Redo|UnDoManager.Redo().md|Redo() -E:DefaultUnDo.UnDoManager.PropertyChanged|UnDoManager.PropertyChanged.md|PropertyChanged -T:DefaultUnDo.UnDoManager|UnDoManager.md|UnDoManager -P:DefaultUnDo.ValueUnDo.MergeInterval|ValueUnDo.MergeInterval.md|MergeInterval -P:DefaultUnDo.ValueUnDo.MergeDescriptionAction|ValueUnDo.MergeDescriptionAction.md|MergeDescriptionAction -T:DefaultUnDo.ValueUnDo|ValueUnDo.md|ValueUnDo -P:DefaultUnDo.ValueUnDo`1.MergeInterval|ValueUnDo_T_.MergeInterval.md|MergeInterval -P:DefaultUnDo.ValueUnDo`1.MergeDescriptionAction|ValueUnDo_T_.MergeDescriptionAction.md|MergeDescriptionAction -P:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Description|ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description -M:DefaultUnDo.ValueUnDo`1.#ctor(System.Object,System.Action{`0},`0,`0)|ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md|ValueUnDo(object, Action, T, T) -M:DefaultUnDo.ValueUnDo`1.#ctor(System.Action{`0},`0,`0)|ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md|ValueUnDo(Action, T, T) -M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IMergeableUnDo#TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md|DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) -M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Do|ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() -M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Undo|ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() -T:DefaultUnDo.ValueUnDo`1|ValueUnDo_T_.md|ValueUnDo -T:DefaultUnDo.GroupUnDo.MergeDescriptionHandler|GroupUnDo.MergeDescriptionHandler(object,object,object).md|MergeDescriptionHandler(object, object, object) -T:DefaultUnDo.ValueUnDo.MergeDescriptionHandler|ValueUnDo.MergeDescriptionHandler(object,object).md|MergeDescriptionHandler(object, object) -T:DefaultUnDo.ValueUnDo`1.MergeDescriptionHandler|ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md|MergeDescriptionHandler(object, T, object, T) +P:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Description|DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.CollectionUnDo`1.#ctor(System.Object,System.Collections.Generic.ICollection{`0},`0,System.Boolean)|DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool)|CollectionUnDo(object, ICollection, T, bool) +M:DefaultUnDo.CollectionUnDo`1.#ctor(System.Collections.Generic.ICollection{`0},`0,System.Boolean)|DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool)|CollectionUnDo(ICollection, T, bool) +M:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Undo|DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +M:DefaultUnDo.CollectionUnDo`1.DefaultUnDo#IUnDo#Do|DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +N:DefaultUnDo|index.md#DefaultUnDo|DefaultUnDo +T:DefaultUnDo.CollectionUnDo`1|DefaultUnDo/CollectionUnDo_T_/index.md|CollectionUnDo +P:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Description|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.DictionaryUnDo`2.#ctor(System.Object,System.Collections.Generic.IDictionary{`0,`1},`0,`1,System.Boolean)|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool)|DictionaryUnDo(object, IDictionary, TKey, TValue, bool) +M:DefaultUnDo.DictionaryUnDo`2.#ctor(System.Collections.Generic.IDictionary{`0,`1},`0,`1,System.Boolean)|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool)|DictionaryUnDo(IDictionary, TKey, TValue, bool) +M:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Do|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +M:DefaultUnDo.DictionaryUnDo`2.DefaultUnDo#IUnDo#Undo|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +T:DefaultUnDo.DictionaryUnDo`2|DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md|DictionaryUnDo +M:DefaultUnDo.ICollectionExtensions.AsUnDo``1(System.Collections.Generic.ICollection{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this ICollection, IUnDoManager, Func) +T:DefaultUnDo.ICollectionExtensions|DefaultUnDo/ICollectionExtensions/index.md|ICollectionExtensions +M:DefaultUnDo.IDictionaryExtensions.AsUnDo``2(System.Collections.Generic.IDictionary{``0,``1},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this IDictionary, IUnDoManager, Func) +T:DefaultUnDo.IDictionaryExtensions|DefaultUnDo/IDictionaryExtensions/index.md|IDictionaryExtensions +M:DefaultUnDo.IListExtensions.AsUnDo``1(System.Collections.Generic.IList{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this IList, IUnDoManager, Func) +M:DefaultUnDo.IListExtensions.Move``1(System.Collections.Generic.IList{``0},System.Int32,System.Int32)|DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md|Move(this IList, int, int) +T:DefaultUnDo.IListExtensions|DefaultUnDo/IListExtensions/index.md|IListExtensions +M:DefaultUnDo.ISetExtensions.AsUnDo``1(System.Collections.Generic.ISet{``0},DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoCollectionOperation,System.Object})|DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md|AsUnDo(this ISet, IUnDoManager, Func) +T:DefaultUnDo.ISetExtensions|DefaultUnDo/ISetExtensions/index.md|ISetExtensions +M:DefaultUnDo.IUnDoManagerExtensions.DoAdd``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ISet{``0},``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object)|DoAdd(this IUnDoManager, ISet, T, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoAdd``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object)|DoAdd(this IUnDoManager, ICollection, T, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoClear``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md|DoClear(this IUnDoManager, ICollection, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoRemove``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection{``0},``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object)|DoRemove(this IUnDoManager, ICollection, T, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoAdd``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,``1,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object)|DoAdd(this IUnDoManager, IDictionary, TKey, TValue, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoRemove``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object)|DoRemove(this IUnDoManager, IDictionary, TKey, object) +M:DefaultUnDo.IUnDoManagerExtensions.Do``2(DefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary{``0,``1},``0,``1,System.Object)|DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object)|Do(this IUnDoManager, IDictionary, TKey, TValue, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoInsert``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md|DoInsert(this IUnDoManager, IList, int, T, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoRemoveAt``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md|DoRemoveAt(this IUnDoManager, IList, int, object) +M:DefaultUnDo.IUnDoManagerExtensions.Do``1(DefaultUnDo.IUnDoManager,System.Collections.Generic.IList{``0},System.Int32,``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object)|Do(this IUnDoManager, IList, int, T, object) +M:DefaultUnDo.IUnDoManagerExtensions.Do(DefaultUnDo.IUnDoManager,System.Action,System.Action,System.Object)|DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object)|Do(this IUnDoManager, Action, Action, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoOnDo(DefaultUnDo.IUnDoManager,System.Action,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md|DoOnDo(this IUnDoManager, Action, object) +M:DefaultUnDo.IUnDoManagerExtensions.DoOnUndo(DefaultUnDo.IUnDoManager,System.Action,System.Object)|DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md|DoOnUndo(this IUnDoManager, Action, object) +M:DefaultUnDo.IUnDoManagerExtensions.Do``1(DefaultUnDo.IUnDoManager,System.Action{``0},``0,``0,System.Object)|DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object)|Do(this IUnDoManager, Action, T, T, object) +T:DefaultUnDo.IUnDoManagerExtensions|DefaultUnDo/IUnDoManagerExtensions/index.md|IUnDoManagerExtensions +P:DefaultUnDo.GroupUnDo.MergeDescriptionAction|DefaultUnDo/GroupUnDo/MergeDescriptionAction.md|MergeDescriptionAction +P:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Description|DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.GroupUnDo.#ctor(System.Object,DefaultUnDo.IUnDo[])|DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[])|GroupUnDo(object, IUnDo[]) +M:DefaultUnDo.GroupUnDo.#ctor(DefaultUnDo.IUnDo[])|DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[])|GroupUnDo(IUnDo[]) +M:DefaultUnDo.GroupUnDo.TryGetSingle``1(``0@)|DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md|TryGetSingle(T) +M:DefaultUnDo.GroupUnDo.DefaultUnDo#IMergeableUnDo#TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|DefaultUnDo/GroupUnDo/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md|DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) +M:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Do|DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +M:DefaultUnDo.GroupUnDo.DefaultUnDo#IUnDo#Undo|DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +T:DefaultUnDo.GroupUnDo|DefaultUnDo/GroupUnDo/index.md|GroupUnDo +M:DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|DefaultUnDo/IMergeableUnDo/TryMerge(IUnDo,IUnDo).md|TryMerge(IUnDo, IUnDo) +T:DefaultUnDo.IMergeableUnDo|DefaultUnDo/IMergeableUnDo/index.md|IMergeableUnDo +P:DefaultUnDo.IUnDo.Description|DefaultUnDo/IUnDo/Description.md|Description +M:DefaultUnDo.IUnDo.Do|DefaultUnDo/IUnDo/Do().md|Do() +M:DefaultUnDo.IUnDo.Undo|DefaultUnDo/IUnDo/Undo().md|Undo() +T:DefaultUnDo.IUnDo|DefaultUnDo/IUnDo/index.md|IUnDo +P:DefaultUnDo.IUnDoManager.Version|DefaultUnDo/IUnDoManager/Version.md|Version +P:DefaultUnDo.IUnDoManager.CanUndo|DefaultUnDo/IUnDoManager/CanUndo.md|CanUndo +P:DefaultUnDo.IUnDoManager.CanRedo|DefaultUnDo/IUnDoManager/CanRedo.md|CanRedo +P:DefaultUnDo.IUnDoManager.UndoDescriptions|DefaultUnDo/IUnDoManager/UndoDescriptions.md|UndoDescriptions +P:DefaultUnDo.IUnDoManager.RedoDescriptions|DefaultUnDo/IUnDoManager/RedoDescriptions.md|RedoDescriptions +M:DefaultUnDo.IUnDoManager.BeginTransaction(System.Object)|DefaultUnDo/IUnDoManager/BeginTransaction(object).md|BeginTransaction(object) +M:DefaultUnDo.IUnDoManager.Clear|DefaultUnDo/IUnDoManager/Clear().md|Clear() +M:DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo)|DefaultUnDo/IUnDoManager/Do(IUnDo).md|Do(IUnDo) +M:DefaultUnDo.IUnDoManager.Redo|DefaultUnDo/IUnDoManager/Redo().md|Redo() +M:DefaultUnDo.IUnDoManager.Undo|DefaultUnDo/IUnDoManager/Undo().md|Undo() +T:DefaultUnDo.IUnDoManager|DefaultUnDo/IUnDoManager/index.md|IUnDoManager +M:DefaultUnDo.IUnDoTransaction.Commit|DefaultUnDo/IUnDoTransaction/Commit().md|Commit() +T:DefaultUnDo.IUnDoTransaction|DefaultUnDo/IUnDoTransaction/index.md|IUnDoTransaction +P:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Description|DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.ListUnDo`1.#ctor(System.Object,System.Collections.Generic.IList{`0},System.Int32,`0,System.Boolean)|DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool)|ListUnDo(object, IList, int, T, bool) +M:DefaultUnDo.ListUnDo`1.#ctor(System.Collections.Generic.IList{`0},System.Int32,`0,System.Boolean)|DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool)|ListUnDo(IList, int, T, bool) +M:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Do|DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +M:DefaultUnDo.ListUnDo`1.DefaultUnDo#IUnDo#Undo|DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +T:DefaultUnDo.ListUnDo`1|DefaultUnDo/ListUnDo_T_/index.md|ListUnDo +P:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Description|DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.UnDo.#ctor(System.Object,System.Action,System.Action)|DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(object,System.Action,System.Action)|UnDo(object, Action, Action) +M:DefaultUnDo.UnDo.#ctor(System.Action,System.Action)|DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(System.Action,System.Action)|UnDo(Action, Action) +M:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Do|DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +M:DefaultUnDo.UnDo.DefaultUnDo#IUnDo#Undo|DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +T:DefaultUnDo.UnDo|DefaultUnDo/UnDo/index.md|UnDo +F:DefaultUnDo.UnDoCollectionAction.ICollectionAdd|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionAdd|ICollectionAdd +F:DefaultUnDo.UnDoCollectionAction.ICollectionRemove|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionRemove|ICollectionRemove +F:DefaultUnDo.UnDoCollectionAction.ICollectionClear|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionClear|ICollectionClear +F:DefaultUnDo.UnDoCollectionAction.ISetAdd|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetAdd|ISetAdd +F:DefaultUnDo.UnDoCollectionAction.ISetExceptWith|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetExceptWith|ISetExceptWith +F:DefaultUnDo.UnDoCollectionAction.ISetIntersectWith|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetIntersectWith|ISetIntersectWith +F:DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith|ISetSymmetricExceptWith +F:DefaultUnDo.UnDoCollectionAction.ISetUnionWith|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetUnionWith|ISetUnionWith +F:DefaultUnDo.UnDoCollectionAction.IListMove|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListMove|IListMove +F:DefaultUnDo.UnDoCollectionAction.IListInsert|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListInsert|IListInsert +F:DefaultUnDo.UnDoCollectionAction.IListRemoveAt|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListRemoveAt|IListRemoveAt +F:DefaultUnDo.UnDoCollectionAction.IListIndexer|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListIndexer|IListIndexer +F:DefaultUnDo.UnDoCollectionAction.IDictionaryAdd|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryAdd|IDictionaryAdd +F:DefaultUnDo.UnDoCollectionAction.IDictionaryRemove|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryRemove|IDictionaryRemove +F:DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer|DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer|IDictionaryIndexer +T:DefaultUnDo.UnDoCollectionAction|DefaultUnDo/UnDoCollectionAction/index.md|UnDoCollectionAction +P:DefaultUnDo.UnDoCollectionOperation.Collection|DefaultUnDo/UnDoCollectionOperation/Collection.md|Collection +P:DefaultUnDo.UnDoCollectionOperation.Action|DefaultUnDo/UnDoCollectionOperation/Action.md|Action +P:DefaultUnDo.UnDoCollectionOperation.Parameters|DefaultUnDo/UnDoCollectionOperation/Parameters.md|Parameters +M:DefaultUnDo.UnDoCollectionOperation.#ctor(System.Object,DefaultUnDo.UnDoCollectionAction,System.Object[])|DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md|UnDoCollectionOperation(object, UnDoCollectionAction, object[]) +T:DefaultUnDo.UnDoCollectionOperation|DefaultUnDo/UnDoCollectionOperation/index.md|UnDoCollectionOperation +P:DefaultUnDo.UnDoField`1.Value|DefaultUnDo/UnDoField_T_/Value.md|Value +M:DefaultUnDo.UnDoField`1.#ctor(DefaultUnDo.IUnDoManager,`0,System.Func{DefaultUnDo.UnDoFieldChange{`0},System.Object})|DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_)|UnDoField(IUnDoManager, T, Func,object>) +M:DefaultUnDo.UnDoField`1.#ctor(DefaultUnDo.IUnDoManager,System.Func{DefaultUnDo.UnDoFieldChange{`0},System.Object})|DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_)|UnDoField(IUnDoManager, Func,object>) +M:DefaultUnDo.UnDoField`1.PreSet(`0)|DefaultUnDo/UnDoField_T_/PreSet(T).md|PreSet(T) +M:DefaultUnDo.UnDoField`1.PostSet(`0)|DefaultUnDo/UnDoField_T_/PostSet(T).md|PostSet(T) +M:DefaultUnDo.UnDoField`1.op_Implicit(DefaultUnDo.UnDoField{`0})~`0|DefaultUnDo/UnDoField_T_/implicitoperatorT(UnDoField_T_).md|implicit operator T(UnDoField) +T:DefaultUnDo.UnDoField`1|DefaultUnDo/UnDoField_T_/index.md|UnDoField +P:DefaultUnDo.UnDoFieldChange`1.OldValue|DefaultUnDo/UnDoFieldChange_T_/OldValue.md|OldValue +P:DefaultUnDo.UnDoFieldChange`1.NewValue|DefaultUnDo/UnDoFieldChange_T_/NewValue.md|NewValue +M:DefaultUnDo.UnDoFieldChange`1.#ctor(`0,`0)|DefaultUnDo/UnDoFieldChange_T_/UnDoFieldChange(T,T).md|UnDoFieldChange(T, T) +T:DefaultUnDo.UnDoFieldChange`1|DefaultUnDo/UnDoFieldChange_T_/index.md|UnDoFieldChange +P:DefaultUnDo.UnDoManager.Version|DefaultUnDo/UnDoManager/Version.md|Version +P:DefaultUnDo.UnDoManager.CanUndo|DefaultUnDo/UnDoManager/CanUndo.md|CanUndo +P:DefaultUnDo.UnDoManager.CanRedo|DefaultUnDo/UnDoManager/CanRedo.md|CanRedo +P:DefaultUnDo.UnDoManager.UndoDescriptions|DefaultUnDo/UnDoManager/UndoDescriptions.md|UndoDescriptions +P:DefaultUnDo.UnDoManager.RedoDescriptions|DefaultUnDo/UnDoManager/RedoDescriptions.md|RedoDescriptions +M:DefaultUnDo.UnDoManager.#ctor(System.Int32)|DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager(int)|UnDoManager(int) +M:DefaultUnDo.UnDoManager.#ctor|DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager()|UnDoManager() +M:DefaultUnDo.UnDoManager.BeginTransaction(System.Object)|DefaultUnDo/UnDoManager/BeginTransaction(object).md|BeginTransaction(object) +M:DefaultUnDo.UnDoManager.Clear|DefaultUnDo/UnDoManager/Clear().md|Clear() +M:DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo)|DefaultUnDo/UnDoManager/Do(IUnDo).md|Do(IUnDo) +M:DefaultUnDo.UnDoManager.Undo|DefaultUnDo/UnDoManager/Undo().md|Undo() +M:DefaultUnDo.UnDoManager.Redo|DefaultUnDo/UnDoManager/Redo().md|Redo() +E:DefaultUnDo.UnDoManager.PropertyChanged|DefaultUnDo/UnDoManager/PropertyChanged.md|PropertyChanged +T:DefaultUnDo.UnDoManager|DefaultUnDo/UnDoManager/index.md|UnDoManager +P:DefaultUnDo.ValueUnDo.MergeInterval|DefaultUnDo/ValueUnDo/MergeInterval.md|MergeInterval +P:DefaultUnDo.ValueUnDo.MergeDescriptionAction|DefaultUnDo/ValueUnDo/MergeDescriptionAction.md|MergeDescriptionAction +T:DefaultUnDo.ValueUnDo|DefaultUnDo/ValueUnDo/index.md|ValueUnDo +P:DefaultUnDo.ValueUnDo`1.MergeInterval|DefaultUnDo/ValueUnDo_T_/MergeInterval.md|MergeInterval +P:DefaultUnDo.ValueUnDo`1.MergeDescriptionAction|DefaultUnDo/ValueUnDo_T_/MergeDescriptionAction.md|MergeDescriptionAction +P:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Description|DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md|DefaultUnDo.IUnDo.Description +M:DefaultUnDo.ValueUnDo`1.#ctor(System.Object,System.Action{`0},`0,`0)|DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T)|ValueUnDo(object, Action, T, T) +M:DefaultUnDo.ValueUnDo`1.#ctor(System.Action{`0},`0,`0)|DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T)|ValueUnDo(Action, T, T) +M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IMergeableUnDo#TryMerge(DefaultUnDo.IUnDo,DefaultUnDo.IUnDo@)|DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md|DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) +M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Do|DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Do().md|DefaultUnDo.IUnDo.Do() +M:DefaultUnDo.ValueUnDo`1.DefaultUnDo#IUnDo#Undo|DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Undo().md|DefaultUnDo.IUnDo.Undo() +T:DefaultUnDo.ValueUnDo`1|DefaultUnDo/ValueUnDo_T_/index.md|ValueUnDo +T:DefaultUnDo.GroupUnDo.MergeDescriptionHandler|DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md|MergeDescriptionHandler(object, object, object) +T:DefaultUnDo.ValueUnDo.MergeDescriptionHandler|DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md|MergeDescriptionHandler(object, object) +T:DefaultUnDo.ValueUnDo`1.MergeDescriptionHandler|DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md|MergeDescriptionHandler(object, T, object, T) +M:DefaultUnDo.CollectionUnDo`1.CollectionUnDo|DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md|CollectionUnDo +M:DefaultUnDo.DictionaryUnDo`2.DictionaryUnDo|DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md|DictionaryUnDo +M:DefaultUnDo.GroupUnDo.GroupUnDo|DefaultUnDo/GroupUnDo/GroupUnDo.md|GroupUnDo +M:DefaultUnDo.ListUnDo`1.ListUnDo|DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md|ListUnDo +M:DefaultUnDo.UnDo.UnDo|DefaultUnDo/UnDo/UnDo.md|UnDo +M:DefaultUnDo.UnDoField`1.UnDoField|DefaultUnDo/UnDoField_T_/UnDoField_T_.md|UnDoField +M:DefaultUnDo.UnDoManager.UnDoManager|DefaultUnDo/UnDoManager/UnDoManager.md|UnDoManager +M:DefaultUnDo.ValueUnDo`1.ValueUnDo|DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md|ValueUnDo +M:DefaultUnDo.IUnDoManagerExtensions.DoAdd|DefaultUnDo/IUnDoManagerExtensions/DoAdd.md|DoAdd +M:DefaultUnDo.IUnDoManagerExtensions.DoRemove|DefaultUnDo/IUnDoManagerExtensions/DoRemove.md|DoRemove +M:DefaultUnDo.IUnDoManagerExtensions.Do|DefaultUnDo/IUnDoManagerExtensions/Do.md|Do diff --git a/documentation/api/CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md b/documentation/api/CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md deleted file mode 100644 index 0f83d74..0000000 --- a/documentation/api/CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md +++ /dev/null @@ -1,34 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') - -## CollectionUnDo(ICollection, T, bool) Constructor - -Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). - -```csharp -public CollectionUnDo(System.Collections.Generic.ICollection source, T item, bool isAdd); -``` -#### Parameters - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo.CollectionUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') on which to perform operation. - - - -`item` [T](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo.CollectionUnDo.T') - -The argument of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is an [System.Collections.Generic.ICollection<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System.Collections.Generic.ICollection`1.Add(`0)'), false for a [System.Collections.Generic.ICollection<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System.Collections.Generic.ICollection`1.Remove(`0)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool).source 'DefaultUnDo.CollectionUnDo.CollectionUnDo(System.Collections.Generic.ICollection, T, bool).source') is null. \ No newline at end of file diff --git a/documentation/api/CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md b/documentation/api/CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md deleted file mode 100644 index 910e865..0000000 --- a/documentation/api/CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') - -## CollectionUnDo(object, ICollection, T, bool) Constructor - -Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). - -```csharp -public CollectionUnDo(object? description, System.Collections.Generic.ICollection source, T item, bool isAdd); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo.CollectionUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') on which to perform operation. - - - -`item` [T](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo.CollectionUnDo.T') - -The argument of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is an [System.Collections.Generic.ICollection<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System.Collections.Generic.ICollection`1.Add(`0)'), false for a [System.Collections.Generic.ICollection<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System.Collections.Generic.ICollection`1.Remove(`0)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool).source 'DefaultUnDo.CollectionUnDo.CollectionUnDo(object, System.Collections.Generic.ICollection, T, bool).source') is null. \ No newline at end of file diff --git a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md b/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index f584a5a..0000000 --- a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') - -## CollectionUnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md b/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index f0395a6..0000000 --- a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') - -## CollectionUnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md b/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index f6e6f2a..0000000 --- a/documentation/api/CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') - -## CollectionUnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/CollectionUnDo_T_.md b/documentation/api/CollectionUnDo_T_.md deleted file mode 100644 index f0fcaf0..0000000 --- a/documentation/api/CollectionUnDo_T_.md +++ /dev/null @@ -1,33 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## CollectionUnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') operation. - -```csharp -public sealed class CollectionUnDo : -DefaultUnDo.IUnDo -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 CollectionUnDo - -Implements [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [CollectionUnDo(object, ICollection<T>, T, bool)](CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md 'DefaultUnDo.CollectionUnDo.CollectionUnDo(object, System.Collections.Generic.ICollection, T, bool)') | Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). | -| [CollectionUnDo(ICollection<T>, T, bool)](CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md 'DefaultUnDo.CollectionUnDo.CollectionUnDo(System.Collections.Generic.ICollection, T, bool)') | Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IUnDo.Description](CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/DefaultUnDo.md b/documentation/api/DefaultUnDo.md deleted file mode 100644 index ad5455c..0000000 --- a/documentation/api/DefaultUnDo.md +++ /dev/null @@ -1,155 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') - -## DefaultUnDo Assembly - -This is the full API documentation of DefaultUnDo. -### Namespaces - - - -## DefaultUnDo Namespace -- **[CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') operation. - - **[CollectionUnDo(object, ICollection<T>, T, bool)](CollectionUnDo_T_.CollectionUnDo(object,ICollection_T_,T,bool).md 'DefaultUnDo.CollectionUnDo.CollectionUnDo(object, System.Collections.Generic.ICollection, T, bool)')** `Constructor` Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). - - **[CollectionUnDo(ICollection<T>, T, bool)](CollectionUnDo_T_.CollectionUnDo(ICollection_T_,T,bool).md 'DefaultUnDo.CollectionUnDo.CollectionUnDo(System.Collections.Generic.ICollection, T, bool)')** `Constructor` Initialise an instance of [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo'). - - **[DefaultUnDo.IUnDo.Description](CollectionUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](CollectionUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](CollectionUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.CollectionUnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') operation. - - **[DictionaryUnDo(object, IDictionary<TKey,TValue>, TKey, TValue, bool)](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(object, System.Collections.Generic.IDictionary, TKey, TValue, bool)')** `Constructor` Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). - - **[DictionaryUnDo(IDictionary<TKey,TValue>, TKey, TValue, bool)](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(System.Collections.Generic.IDictionary, TKey, TValue, bool)')** `Constructor` Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). - - **[DefaultUnDo.IUnDo.Description](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for a group of operations. - - **[GroupUnDo(IUnDo[])](GroupUnDo.GroupUnDo(IUnDo[]).md 'DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[])')** `Constructor` Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). - - **[GroupUnDo(object, IUnDo[])](GroupUnDo.GroupUnDo(object,IUnDo[]).md 'DefaultUnDo.GroupUnDo.GroupUnDo(object, DefaultUnDo.IUnDo[])')** `Constructor` Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). - - **[MergeDescriptionAction](GroupUnDo.MergeDescriptionAction.md 'DefaultUnDo.GroupUnDo.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler(object, object, object)](GroupUnDo.MergeDescriptionHandler(object,object,object).md 'DefaultUnDo.GroupUnDo.MergeDescriptionHandler(object, object, object)') used to merge description between a [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and a [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') instances. - - **[TryGetSingle<T>(T)](GroupUnDo.TryGetSingle_T_(T).md 'DefaultUnDo.GroupUnDo.TryGetSingle(T)')** `Method` Gets the single T of this instance. - - **[DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo)](GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)')** `Explicit Interface Implementation` Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - - **[DefaultUnDo.IUnDo.Description](GroupUnDo.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](GroupUnDo.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](GroupUnDo.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[ICollectionExtension](ICollectionExtension.md 'DefaultUnDo.ICollectionExtension')** `Class` Provides a method to wrap an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') to an UnDo collection linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[AsUnDo<T>(this ICollection<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func)')** `Method` Wraps an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') to an UnDo collection linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. -- **[IDictionaryExtension](IDictionaryExtension.md 'DefaultUnDo.IDictionaryExtension')** `Class` Provides a method to wrap an [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') to an UnDo dictionary linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[AsUnDo<TKey,TValue>(this IDictionary<TKey,TValue>, IUnDoManager, Func<UnDoCollectionOperation,object>)](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func)')** `Method` Wraps an [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') to an UnDo dictionary linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. -- **[IListExtension](IListExtension.md 'DefaultUnDo.IListExtension')** `Class` Provides a method to wrap an [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') to an UnDo list linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[AsUnDo<T>(this IList<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func)')** `Method` Wraps an [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') to an UnDo list linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[Move<T>(this IList<T>, int, int)](IListExtension.Move_T_(thisIList_T_,int,int).md 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int)')** `Method` Moves the item at the specified index to a new location in the collection. - If source is an UnDo list and its inner source an [System.Collections.ObjectModel.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System.Collections.ObjectModel.ObservableCollection`1'), it will use the [System.Collections.ObjectModel.ObservableCollection<>.Move(System.Int32,System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System.Collections.ObjectModel.ObservableCollection`1.Move(System.Int32,System.Int32)') method; - else it will do an [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)') and [System.Collections.Generic.IList<>.Insert(System.Int32,@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System.Collections.Generic.IList`1.Insert(System.Int32,`0)'). -- **[ISetExtension](ISetExtension.md 'DefaultUnDo.ISetExtension')** `Class` Provides a method to wrap an [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') to an UnDo set linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[AsUnDo<T>(this ISet<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func)')** `Method` Wraps an [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') to an UnDo set linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. -- **[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension')** `Class` Provides methods to create [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and add them to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - **[Do(this IUnDoManager, Action, Action, object)](IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, System.Action, object)')** `Method` Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified doAction and undoAction. - - **[Do<T>(this IUnDoManager, Action<T>, T, T, object)](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object)')** `Method` Sets a value as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[Do<T>(this IUnDoManager, IList<T>, int, T, object)](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object)')** `Method` Sets the element at the specified index on a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[Do<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object)](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object)')** `Method` Sets the element with the specified key on a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoAdd<T>(this IUnDoManager, ICollection<T>, T, object)](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object)')** `Method` Adds a value to a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoAdd<T>(this IUnDoManager, ISet<T>, T, object)](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object)')** `Method` Adds an item from a [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoAdd<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object)](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object)')** `Method` Adds a value to a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoClear<T>(this IUnDoManager, ICollection<T>, object)](IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md 'DefaultUnDo.IUnDoManagerExtension.DoClear(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, object)')** `Method` Clears a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoInsert<T>(this IUnDoManager, IList<T>, int, T, object)](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object)')** `Method` Inserts an item to a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoOnDo(this IUnDoManager, Action, object)](IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.DoOnDo(this DefaultUnDo.IUnDoManager, System.Action, object)')** `Method` Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no undo. - - **[DoOnUndo(this IUnDoManager, Action, object)](IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.DoOnUndo(this DefaultUnDo.IUnDoManager, System.Action, object)')** `Method` Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no do. - - **[DoRemove<T>(this IUnDoManager, ICollection<T>, T, object)](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object)')** `Method` Removes an item from a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoRemove<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, object)](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object)')** `Method` Removes the item with the specified key from a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[DoRemoveAt<T>(this IUnDoManager, IList<T>, int, object)](IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemoveAt(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, object)')** `Method` Removes an item from a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. -- **[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') operation. - - **[ListUnDo(object, IList<T>, int, T, bool)](ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md 'DefaultUnDo.ListUnDo.ListUnDo(object, System.Collections.Generic.IList, int, T, bool)')** `Constructor` Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). - - **[ListUnDo(IList<T>, int, T, bool)](ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md 'DefaultUnDo.ListUnDo.ListUnDo(System.Collections.Generic.IList, int, T, bool)')** `Constructor` Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). - - **[DefaultUnDo.IUnDo.Description](ListUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](ListUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[UnDo](UnDo.md 'DefaultUnDo.UnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for custom do and undo action. - - **[UnDo(object, Action, Action)](UnDo.UnDo(object,Action,Action).md 'DefaultUnDo.UnDo.UnDo(object, System.Action, System.Action)')** `Constructor` Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). - - **[UnDo(Action, Action)](UnDo.UnDo(Action,Action).md 'DefaultUnDo.UnDo.UnDo(System.Action, System.Action)')** `Constructor` Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). - - **[DefaultUnDo.IUnDo.Description](UnDo.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](UnDo.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](UnDo.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField')** `Class` Provides a simple wrapper for a field to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[UnDoField(IUnDoManager, Func<UnDoFieldChange<T>,object>)](UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, System.Func,object>)')** `Constructor` Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - - **[UnDoField(IUnDoManager, T, Func<UnDoFieldChange<T>,object>)](UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, T, System.Func,object>)')** `Constructor` Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - - **[Value](UnDoField_T_.Value.md 'DefaultUnDo.UnDoField.Value')** `Property` Gets or sets the value of the field, generating a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on set. - - **[PostSet(T)](UnDoField_T_.PostSet(T).md 'DefaultUnDo.UnDoField.PostSet(T)')** `Method` performs a post set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[PreSet(T)](UnDoField_T_.PreSet(T).md 'DefaultUnDo.UnDoField.PreSet(T)')** `Method` Performs a pre set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - - **[ToT()](UnDoField_T_.ToT().md 'DefaultUnDo.UnDoField.ToT()')** `Method` Returns the underlying T. - - **[implicit operator T(UnDoField<T>)](UnDoField_T_.implicitoperatorT(UnDoField_T_).md 'DefaultUnDo.UnDoField.op_Implicit T(DefaultUnDo.UnDoField)')** `Operator` Defines an implicit conversion of a [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') to a T. -- **[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager')** `Class` Provides an implementation of the command pattern to execute operations and return to a previous state by undoing them. - - **[UnDoManager()](UnDoManager.UnDoManager().md 'DefaultUnDo.UnDoManager.UnDoManager()')** `Constructor` Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). - - **[UnDoManager(int)](UnDoManager.UnDoManager(int).md 'DefaultUnDo.UnDoManager.UnDoManager(int)')** `Constructor` Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). - - **[CanRedo](UnDoManager.CanRedo.md 'DefaultUnDo.UnDoManager.CanRedo')** `Property` Returns a boolean to express if the method [Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()') can be executed. - - **[CanUndo](UnDoManager.CanUndo.md 'DefaultUnDo.UnDoManager.CanUndo')** `Property` Returns a boolean to express if the method [Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()') can be executed. - - **[RedoDescriptions](UnDoManager.RedoDescriptions.md 'DefaultUnDo.UnDoManager.RedoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. - - **[UndoDescriptions](UnDoManager.UndoDescriptions.md 'DefaultUnDo.UnDoManager.UndoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. - - **[Version](UnDoManager.Version.md 'DefaultUnDo.UnDoManager.Version')** `Property` Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - **[BeginTransaction(object)](UnDoManager.BeginTransaction(object).md 'DefaultUnDo.UnDoManager.BeginTransaction(object)')** `Method` Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group. - If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). - - **[Clear()](UnDoManager.Clear().md 'DefaultUnDo.UnDoManager.Clear()')** `Method` Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[Do(IUnDo)](UnDoManager.Do(IUnDo).md 'DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo)')** `Method` Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. - - **[Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()')** `Method` Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - - **[Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()')** `Method` Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - - **[PropertyChanged](UnDoManager.PropertyChanged.md 'DefaultUnDo.UnDoManager.PropertyChanged')** `Event` Occurs when a property value changes. -- **[ValueUnDo](ValueUnDo.md 'DefaultUnDo.ValueUnDo')** `Class` Provides a global [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') to use as default merge interval for all [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - - **[MergeDescriptionAction](ValueUnDo.MergeDescriptionAction.md 'DefaultUnDo.ValueUnDo.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler(object, object)](ValueUnDo.MergeDescriptionHandler(object,object).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. - - **[MergeInterval](ValueUnDo.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval')** `Property` The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable. - Default value is 500ms. -- **[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo')** `Class` Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for setting value. - - **[ValueUnDo(object, Action<T>, T, T)](ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md 'DefaultUnDo.ValueUnDo.ValueUnDo(object, System.Action, T, T)')** `Constructor` Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - - **[ValueUnDo(Action<T>, T, T)](ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md 'DefaultUnDo.ValueUnDo.ValueUnDo(System.Action, T, T)')** `Constructor` Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - - **[MergeDescriptionAction](ValueUnDo_T_.MergeDescriptionAction.md 'DefaultUnDo.ValueUnDo.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler(object, T, object, T)](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. - - **[MergeInterval](ValueUnDo_T_.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval')** `Property` The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable. - If not set, [MergeInterval](ValueUnDo.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval') will be used. - - **[DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo)](ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)')** `Explicit Interface Implementation` Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - - **[DefaultUnDo.IUnDo.Description](ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[DefaultUnDo.IUnDo.Do()](ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Do()')** `Explicit Interface Implementation` Does an action. - - **[DefaultUnDo.IUnDo.Undo()](ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Undo()')** `Explicit Interface Implementation` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation')** `Struct` Provides data for the operation about to be performed on an undo collection. - - **[UnDoCollectionOperation(object, UnDoCollectionAction, object[])](UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md 'DefaultUnDo.UnDoCollectionOperation.UnDoCollectionOperation(object, DefaultUnDo.UnDoCollectionAction, object[])')** `Constructor` Initializes a new instance of the [UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') struct. - - **[Action](UnDoCollectionOperation.Action.md 'DefaultUnDo.UnDoCollectionOperation.Action')** `Property` Gets the action performed. - - **[Collection](UnDoCollectionOperation.Collection.md 'DefaultUnDo.UnDoCollectionOperation.Collection')** `Property` Gets the collection on which the action is performed. - - **[Parameters](UnDoCollectionOperation.Parameters.md 'DefaultUnDo.UnDoCollectionOperation.Parameters')** `Property` Gets the parameters of the action performed. -- **[UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange')** `Struct` Describes a value change operation done on a [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - - **[UnDoFieldChange(T, T)](UnDoFieldChange_T_.UnDoFieldChange(T,T).md 'DefaultUnDo.UnDoFieldChange.UnDoFieldChange(T, T)')** `Constructor` Initializes a new instance of the [UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') struct. - - **[NewValue](UnDoFieldChange_T_.NewValue.md 'DefaultUnDo.UnDoFieldChange.NewValue')** `Property` Gets the field new value. - - **[OldValue](UnDoFieldChange_T_.OldValue.md 'DefaultUnDo.UnDoFieldChange.OldValue')** `Property` Gets the field old value. -- **[IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo')** `Interface` Provides a method to try to merge two [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instances into a single one. - - **[TryMerge(IUnDo, IUnDo)](IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)')** `Method` Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). -- **[IUnDo](IUnDo.md 'DefaultUnDo.IUnDo')** `Interface` Provides methods to execute an action and remove its effect. - - **[Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description')** `Property` Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - - **[Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()')** `Method` Does an action. - - **[Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()')** `Method` Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. -- **[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager')** `Interface` Provides properties and methods of the command pattern to execute operations and return to a previous state by undoing them. - - **[CanRedo](IUnDoManager.CanRedo.md 'DefaultUnDo.IUnDoManager.CanRedo')** `Property` Returns a boolean to express if the method [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') can be executed. - - **[CanUndo](IUnDoManager.CanUndo.md 'DefaultUnDo.IUnDoManager.CanUndo')** `Property` Returns a boolean to express if the method [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') can be executed. - - **[RedoDescriptions](IUnDoManager.RedoDescriptions.md 'DefaultUnDo.IUnDoManager.RedoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. - - **[UndoDescriptions](IUnDoManager.UndoDescriptions.md 'DefaultUnDo.IUnDoManager.UndoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. - - **[Version](IUnDoManager.Version.md 'DefaultUnDo.IUnDoManager.Version')** `Property` Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - **[BeginTransaction(object)](IUnDoManager.BeginTransaction(object).md 'DefaultUnDo.IUnDoManager.BeginTransaction(object)')** `Method` Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group. - If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). - - **[Clear()](IUnDoManager.Clear().md 'DefaultUnDo.IUnDoManager.Clear()')** `Method` Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - **[Do(IUnDo)](IUnDoManager.Do(IUnDo).md 'DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo)')** `Method` Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. - - **[Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()')** `Method` Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - - **[Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()')** `Method` Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. -- **[IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction')** `Interface` Represents a transaction to record multiple undo operations as a single operation in the history of a [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - **[Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()')** `Method` Groups all recorded operations in a single [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and add it to the history of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') instance this instance was created from. - If this method is not called before disposing current instance, all recorded operations will be undone. -- **[UnDoCollectionAction](UnDoCollectionAction.md 'DefaultUnDo.UnDoCollectionAction')** `Enum` Describes the action that will be performed on an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') and recorded by an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - **[ICollectionAdd](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionAdd 'DefaultUnDo.UnDoCollectionAction.ICollectionAdd')** `Field` [System.Collections.Generic.ICollection<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System.Collections.Generic.ICollection`1.Add(`0)') will be performed. - - **[ICollectionClear](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionClear 'DefaultUnDo.UnDoCollectionAction.ICollectionClear')** `Field` [System.Collections.Generic.ICollection<>.Clear](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Clear 'System.Collections.Generic.ICollection`1.Clear') will be performed. - - **[ICollectionRemove](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ICollectionRemove 'DefaultUnDo.UnDoCollectionAction.ICollectionRemove')** `Field` [System.Collections.Generic.ICollection<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System.Collections.Generic.ICollection`1.Remove(`0)') will be performed. - - **[IDictionaryAdd](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryAdd 'DefaultUnDo.UnDoCollectionAction.IDictionaryAdd')** `Field` [System.Collections.Generic.IDictionary<>.Add(@0,@1)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System.Collections.Generic.IDictionary`2.Add(`0,`1)') will be performed. - - **[IDictionaryIndexer](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer 'DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer')** `Field` [System.Collections.Generic.IDictionary<>.Item(@@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Item#System_Collections_Generic_IDictionary_2_Item___0_ 'System.Collections.Generic.IDictionary`2.Item(``0)') will be performed. - - **[IDictionaryRemove](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IDictionaryRemove 'DefaultUnDo.UnDoCollectionAction.IDictionaryRemove')** `Field` [System.Collections.Generic.IDictionary<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System.Collections.Generic.IDictionary`2.Remove(`0)') will be performed. - - **[IListIndexer](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListIndexer 'DefaultUnDo.UnDoCollectionAction.IListIndexer')** `Field` [System.Collections.Generic.IList<>.Item(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Item#System_Collections_Generic_IList_1_Item_System_Int32_ 'System.Collections.Generic.IList`1.Item(System.Int32)') will be performed. - - **[IListInsert](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListInsert 'DefaultUnDo.UnDoCollectionAction.IListInsert')** `Field` [System.Collections.Generic.IList<>.Insert(System.Int32,@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System.Collections.Generic.IList`1.Insert(System.Int32,`0)') will be performed. - - **[IListMove](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListMove 'DefaultUnDo.UnDoCollectionAction.IListMove')** `Field` [Move<T>(this IList<T>, int, int)](IListExtension.Move_T_(thisIList_T_,int,int).md 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int)') will be performed. - - **[IListRemoveAt](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.IListRemoveAt 'DefaultUnDo.UnDoCollectionAction.IListRemoveAt')** `Field` [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)') will be performed. - - **[ISetAdd](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetAdd 'DefaultUnDo.UnDoCollectionAction.ISetAdd')** `Field` [System.Collections.Generic.ISet<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.Add#System_Collections_Generic_ISet_1_Add__0_ 'System.Collections.Generic.ISet`1.Add(`0)') will be performed. - - **[ISetExceptWith](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetExceptWith 'DefaultUnDo.UnDoCollectionAction.ISetExceptWith')** `Field` [System.Collections.Generic.ISet<>.ExceptWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.ExceptWith#System_Collections_Generic_ISet_1_ExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.ExceptWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - **[ISetIntersectWith](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetIntersectWith 'DefaultUnDo.UnDoCollectionAction.ISetIntersectWith')** `Field` [System.Collections.Generic.ISet<>.IntersectWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.IntersectWith#System_Collections_Generic_ISet_1_IntersectWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.IntersectWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - **[ISetSymmetricExceptWith](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith 'DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith')** `Field` [System.Collections.Generic.ISet<>.SymmetricExceptWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.SymmetricExceptWith#System_Collections_Generic_ISet_1_SymmetricExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.SymmetricExceptWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - **[ISetUnionWith](UnDoCollectionAction.md#DefaultUnDo.UnDoCollectionAction.ISetUnionWith 'DefaultUnDo.UnDoCollectionAction.ISetUnionWith')** `Field` [System.Collections.Generic.ISet<>.UnionWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.UnionWith#System_Collections_Generic_ISet_1_UnionWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})') will be performed. -- **[GroupUnDo.MergeDescriptionHandler(object, object, object)](GroupUnDo.MergeDescriptionHandler(object,object,object).md 'DefaultUnDo.GroupUnDo.MergeDescriptionHandler(object, object, object)')** `Delegate` Represents a method that will be called when merging a [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and a [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') instances to get the resulting description. -- **[ValueUnDo.MergeDescriptionHandler(object, object)](ValueUnDo.MergeDescriptionHandler(object,object).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object)')** `Delegate` Represents a method that will be called when merging two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances to get the resulting description. -- **[ValueUnDo<T>.MergeDescriptionHandler(object, T, object, T)](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)')** `Delegate` Represents a method that will be called when merging two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances to get the resulting description. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md b/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md new file mode 100644 index 0000000..a72bd51 --- /dev/null +++ b/documentation/api/DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md @@ -0,0 +1,83 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\') + +## CollectionUnDo\ Constructors + +| Overloads | | +| :--- | :--- | +| [CollectionUnDo\(object, ICollection<T>, T, bool\)](DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(object, System\.Collections\.Generic\.ICollection\, T, bool\)') | Initialise an instance of [CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\')\. | +| [CollectionUnDo\(ICollection<T>, T, bool\)](DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(System\.Collections\.Generic\.ICollection\, T, bool\)') | Initialise an instance of [CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\')\. | + + + +## CollectionUnDo\(object, ICollection\, T, bool\) Constructor + +Initialise an instance of [CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\')\. + +```csharp +public CollectionUnDo(object? description, System.Collections.Generic.ICollection source, T item, bool isAdd); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](index.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo\.CollectionUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') on which to perform operation\. + + + +`item` [T](index.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo\.CollectionUnDo\\.T') + +The argument of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is an [System\.Collections\.Generic\.ICollection<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System\.Collections\.Generic\.ICollection\`1\.Add\(\`0\)'), false for a [System\.Collections\.Generic\.ICollection<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System\.Collections\.Generic\.ICollection\`1\.Remove\(\`0\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool).source 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(object, System\.Collections\.Generic\.ICollection\, T, bool\)\.source') is null\. + + + +## CollectionUnDo\(ICollection\, T, bool\) Constructor + +Initialise an instance of [CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\')\. + +```csharp +public CollectionUnDo(System.Collections.Generic.ICollection source, T item, bool isAdd); +``` +#### Parameters + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](index.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo\.CollectionUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') on which to perform operation\. + + + +`item` [T](index.md#DefaultUnDo.CollectionUnDo_T_.T 'DefaultUnDo\.CollectionUnDo\\.T') + +The argument of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is an [System\.Collections\.Generic\.ICollection<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System\.Collections\.Generic\.ICollection\`1\.Add\(\`0\)'), false for a [System\.Collections\.Generic\.ICollection<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System\.Collections\.Generic\.ICollection\`1\.Remove\(\`0\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool).source 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(System\.Collections\.Generic\.ICollection\, T, bool\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..1390a70 --- /dev/null +++ b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\') + +## CollectionUnDo\\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..c75631a --- /dev/null +++ b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\') + +## CollectionUnDo\\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..3d85e02 --- /dev/null +++ b/documentation/api/DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[CollectionUnDo<T>](index.md 'DefaultUnDo\.CollectionUnDo\') + +## CollectionUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/CollectionUnDo_T_/index.md b/documentation/api/DefaultUnDo/CollectionUnDo_T_/index.md new file mode 100644 index 0000000..17be2a6 --- /dev/null +++ b/documentation/api/DefaultUnDo/CollectionUnDo_T_/index.md @@ -0,0 +1,32 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## CollectionUnDo\ Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') operation\. + +```csharp +public sealed class CollectionUnDo : DefaultUnDo.IUnDo +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 CollectionUnDo + +Implements [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [CollectionUnDo\(object, ICollection<T>, T, bool\)](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(object, System\.Collections\.Generic\.ICollection\, T, bool\)') | Initialise an instance of [CollectionUnDo<T>](DefaultUnDo/CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\')\. | +| [CollectionUnDo\(ICollection<T>, T, bool\)](CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(System\.Collections\.Generic\.ICollection\, T, bool\)') | Initialise an instance of [CollectionUnDo<T>](DefaultUnDo/CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\')\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..b307868 --- /dev/null +++ b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\') + +## DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..12e512e --- /dev/null +++ b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\') + +## DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..343367c --- /dev/null +++ b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\') + +## DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md new file mode 100644 index 0000000..637f177 --- /dev/null +++ b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md @@ -0,0 +1,95 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\') + +## DictionaryUnDo\ Constructors + +| Overloads | | +| :--- | :--- | +| [DictionaryUnDo\(object, IDictionary<TKey,TValue>, TKey, TValue, bool\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(object, System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\')\. | +| [DictionaryUnDo\(IDictionary<TKey,TValue>, TKey, TValue, bool\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\')\. | + + + +## DictionaryUnDo\(object, IDictionary\, TKey, TValue, bool\) Constructor + +Initialise an instance of [DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\')\. + +```csharp +public DictionaryUnDo(object? description, System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo\.DictionaryUnDo\\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo\.DictionaryUnDo\\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') on which to perform operation\. + + + +`key` [TKey](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo\.DictionaryUnDo\\.TKey') + +The key of the operation\. + + + +`value` [TValue](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo\.DictionaryUnDo\\.TValue') + +The value of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is [System\.Collections\.Generic\.IDictionary<>\.Add\(@0,@1\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System\.Collections\.Generic\.IDictionary\`2\.Add\(\`0,\`1\)'), false for [System\.Collections\.Generic\.IDictionary<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System\.Collections\.Generic\.IDictionary\`2\.Remove\(\`0\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).source 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(object, System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)\.source') or [key](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).key 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(object, System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)\.key') is null\. + + + +## DictionaryUnDo\(IDictionary\, TKey, TValue, bool\) Constructor + +Initialise an instance of [DictionaryUnDo<TKey,TValue>](index.md 'DefaultUnDo\.DictionaryUnDo\')\. + +```csharp +public DictionaryUnDo(System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); +``` +#### Parameters + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo\.DictionaryUnDo\\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo\.DictionaryUnDo\\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') on which to perform operation\. + + + +`key` [TKey](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo\.DictionaryUnDo\\.TKey') + +The key of the operation\. + + + +`value` [TValue](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo\.DictionaryUnDo\\.TValue') + +The value of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is [System\.Collections\.Generic\.IDictionary<>\.Add\(@0,@1\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System\.Collections\.Generic\.IDictionary\`2\.Add\(\`0,\`1\)'), false for [System\.Collections\.Generic\.IDictionary<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System\.Collections\.Generic\.IDictionary\`2\.Remove\(\`0\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).source 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)\.source') or [key](index.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).key 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)\.key') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md new file mode 100644 index 0000000..28c74ef --- /dev/null +++ b/documentation/api/DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md @@ -0,0 +1,38 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## DictionaryUnDo\ Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') operation\. + +```csharp +public sealed class DictionaryUnDo : DefaultUnDo.IUnDo +``` +#### Type parameters + + + +`TKey` + +Type of the keys\. + + + +`TValue` + +Type of the values\. + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 DictionaryUnDo + +Implements [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [DictionaryUnDo\(object, IDictionary<TKey,TValue>, TKey, TValue, bool\)](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(object, System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\')\. | +| [DictionaryUnDo\(IDictionary<TKey,TValue>, TKey, TValue, bool\)](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\')\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md new file mode 100644 index 0000000..8016283 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md @@ -0,0 +1,25 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\) Method + +Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +```csharp +bool DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); +``` +#### Parameters + + + +`other` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The other [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance the current one should try to merge with\. + + + +`mergedCommand` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The resulting merged [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance if the operation was successful\. + +Implements [TryMerge\(IUnDo, IUnDo\)](../IMergeableUnDo/TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..6b9f302 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..65c0217 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..d604330 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md b/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md new file mode 100644 index 0000000..2905373 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/GroupUnDo.md @@ -0,0 +1,65 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo Constructors + +| Overloads | | +| :--- | :--- | +| [GroupUnDo\(IUnDo\[\]\)](DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(DefaultUnDo\.IUnDo\[\]\)') | Initialise an instance of [GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo')\. | +| [GroupUnDo\(object, IUnDo\[\]\)](DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(object, DefaultUnDo\.IUnDo\[\]\)') | Initialise an instance of [GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo')\. | + + + +## GroupUnDo\(IUnDo\[\]\) Constructor + +Initialise an instance of [GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo')\. + +```csharp +public GroupUnDo(params DefaultUnDo.IUnDo[] commands); +``` +#### Parameters + + + +`commands` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')[\[\]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System\.Array') + +The sequence of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') contained by the instance\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[commands](index.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(DefaultUnDo\.IUnDo\[\]\)\.commands') is null\. + +[System\.ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentException 'System\.ArgumentException') +[commands](index.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(DefaultUnDo\.IUnDo\[\]\)\.commands') contains null elements\. + + + +## GroupUnDo\(object, IUnDo\[\]\) Constructor + +Initialise an instance of [GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo')\. + +```csharp +public GroupUnDo(object? description, params DefaultUnDo.IUnDo[] commands); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`commands` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')[\[\]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System\.Array') + +The sequence of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') contained by the instance\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[commands](index.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]).commands 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(object, DefaultUnDo\.IUnDo\[\]\)\.commands') is null\. + +[System\.ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentException 'System\.ArgumentException') +[commands](index.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]).commands 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(object, DefaultUnDo\.IUnDo\[\]\)\.commands') contains null elements\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionAction.md b/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionAction.md new file mode 100644 index 0000000..40da1b9 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionAction.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.MergeDescriptionAction Property + +The [MergeDescriptionHandler\(object, object, object\)](MergeDescriptionHandler(object,object,object)/index.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionHandler\(object, object, object\)') used to merge description between a [GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') and a [IMergeableUnDo](../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') instances\. + +```csharp +public static DefaultUnDo.GroupUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } +``` + +#### Property Value +[MergeDescriptionHandler\(object, object, object\)](MergeDescriptionHandler(object,object,object)/index.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionHandler\(object, object, object\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md b/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md new file mode 100644 index 0000000..f080ebb --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md @@ -0,0 +1,33 @@ +#### [DefaultUnDo](../../../index.md 'index') +### [DefaultUnDo](../../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](../index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.MergeDescriptionHandler\(object, object, object\) Delegate + +Represents a method that will be called when merging a [GroupUnDo](../index.md 'DefaultUnDo\.GroupUnDo') and a [IMergeableUnDo](../../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') instances to get the resulting description\. + +```csharp +public delegate object GroupUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription, object? mergedDescription); +``` +#### Parameters + + + +`oldDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the previous [GroupUnDo](../index.md 'DefaultUnDo\.GroupUnDo') merged\. + + + +`newDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the new [IMergeableUnDo](../../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') merged\. + + + +`mergedDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the new resulting [IMergeableUnDo](../../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') merged\. + +#### Returns +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') +The final description to use\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md b/documentation/api/DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md new file mode 100644 index 0000000..2d365f4 --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md @@ -0,0 +1,30 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](index.md 'DefaultUnDo\.GroupUnDo') + +## GroupUnDo\.TryGetSingle\\(T\) Method + +Gets the single [T](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T') of this instance\. + +```csharp +public bool TryGetSingle(out T command) + where T : class, DefaultUnDo.IUnDo; +``` +#### Type parameters + + + +`T` + +The type of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') to get\. +#### Parameters + + + +`command` [T](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T') + +When this method returns, the single [T](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T') of this instance, if it was its only command; otherwise, the default value for the type [T](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T')\. +This parameter is passed uninitialized\. + +#### Returns +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') +true if the current instance contains exactly one [T](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T'); otherwise false\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/GroupUnDo/index.md b/documentation/api/DefaultUnDo/GroupUnDo/index.md new file mode 100644 index 0000000..b61938f --- /dev/null +++ b/documentation/api/DefaultUnDo/GroupUnDo/index.md @@ -0,0 +1,34 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## GroupUnDo Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for a group of operations\. + +```csharp +public sealed class GroupUnDo : DefaultUnDo.IMergeableUnDo, DefaultUnDo.IUnDo +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 GroupUnDo + +Implements [IMergeableUnDo](../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo'), [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [GroupUnDo\(IUnDo\[\]\)](GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(DefaultUnDo\.IUnDo\[\]\)') | Initialise an instance of [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo')\. | +| [GroupUnDo\(object, IUnDo\[\]\)](GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(object, DefaultUnDo\.IUnDo\[\]\)') | Initialise an instance of [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo')\. | + +| Properties | | +| :--- | :--- | +| [MergeDescriptionAction](MergeDescriptionAction.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionAction') | The [MergeDescriptionHandler\(object, object, object\)](MergeDescriptionHandler(object,object,object)/index.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionHandler\(object, object, object\)') used to merge description between a [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and a [IMergeableUnDo](../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') instances\. | + +| Methods | | +| :--- | :--- | +| [TryGetSingle<T>\(T\)](TryGetSingle_T_(T).md 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)') | Gets the single [T](TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)\.T') of this instance\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\)](DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)') | Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md new file mode 100644 index 0000000..12c0079 --- /dev/null +++ b/documentation/api/DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md @@ -0,0 +1,45 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ICollectionExtensions](index.md 'DefaultUnDo\.ICollectionExtensions') + +## ICollectionExtensions\.AsUnDo\\(this ICollection\, IUnDoManager, Func\\) Method + +Wraps an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') to an UnDo collection linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static System.Collections.Generic.ICollection AsUnDo(this System.Collections.Generic.ICollection source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. +#### Parameters + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[UnDoCollectionOperation](../UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Returns +[System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') +A wrapped [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.source') or [manager](DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ICollectionExtensions/index.md b/documentation/api/DefaultUnDo/ICollectionExtensions/index.md new file mode 100644 index 0000000..eea914d --- /dev/null +++ b/documentation/api/DefaultUnDo/ICollectionExtensions/index.md @@ -0,0 +1,16 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## ICollectionExtensions Class + +Provides a method to wrap an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') to an UnDo collection linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static class ICollectionExtensions +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 ICollectionExtensions + +| Methods | | +| :--- | :--- | +| [AsUnDo<T>\(this ICollection<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)') | Wraps an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') to an UnDo collection linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | diff --git a/documentation/api/DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md new file mode 100644 index 0000000..59efa3c --- /dev/null +++ b/documentation/api/DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md @@ -0,0 +1,51 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IDictionaryExtensions](index.md 'DefaultUnDo\.IDictionaryExtensions') + +## IDictionaryExtensions\.AsUnDo\\(this IDictionary\, IUnDoManager, Func\\) Method + +Wraps an [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') to an UnDo dictionary linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static System.Collections.Generic.IDictionary AsUnDo(this System.Collections.Generic.IDictionary source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); +``` +#### Type parameters + + + +`TKey` + +The type of keys\. + + + +`TValue` + +The type of values\. +#### Parameters + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TKey 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TValue 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')\. + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[UnDoCollectionOperation](../UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Returns +[System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TKey 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TValue 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') +A wrapped [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.source') or [manager](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtensions.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IDictionaryExtensions/index.md b/documentation/api/DefaultUnDo/IDictionaryExtensions/index.md new file mode 100644 index 0000000..fa6a1dc --- /dev/null +++ b/documentation/api/DefaultUnDo/IDictionaryExtensions/index.md @@ -0,0 +1,16 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IDictionaryExtensions Class + +Provides a method to wrap an [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') to an UnDo dictionary linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static class IDictionaryExtensions +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 IDictionaryExtensions + +| Methods | | +| :--- | :--- | +| [AsUnDo<TKey,TValue>\(this IDictionary<TKey,TValue>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)') | Wraps an [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') to an UnDo dictionary linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | diff --git a/documentation/api/DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md new file mode 100644 index 0000000..b59928f --- /dev/null +++ b/documentation/api/DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md @@ -0,0 +1,45 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IListExtensions](index.md 'DefaultUnDo\.IListExtensions') + +## IListExtensions\.AsUnDo\\(this IList\, IUnDoManager, Func\\) Method + +Wraps an [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') to an UnDo list linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static System.Collections.Generic.IList AsUnDo(this System.Collections.Generic.IList source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. +#### Parameters + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtensions.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[UnDoCollectionOperation](../UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Returns +[System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtensions.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') +A wrapped [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtensions.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.source') or [manager](DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtensions.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md b/documentation/api/DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md new file mode 100644 index 0000000..09ec0ac --- /dev/null +++ b/documentation/api/DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md @@ -0,0 +1,43 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IListExtensions](index.md 'DefaultUnDo\.IListExtensions') + +## IListExtensions\.Move\\(this IList\, int, int\) Method + +Moves the item at the specified index to a new location in the collection\. +If [source](DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtensions.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).source 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)\.source') is an UnDo list and its inner source an [System\.Collections\.ObjectModel\.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System\.Collections\.ObjectModel\.ObservableCollection\`1'), it will use the [System\.Collections\.ObjectModel\.ObservableCollection<>\.Move\(System\.Int32,System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System\.Collections\.ObjectModel\.ObservableCollection\`1\.Move\(System\.Int32,System\.Int32\)') method; +else it will do an [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)') and [System\.Collections\.Generic\.IList<>\.Insert\(System\.Int32,@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System\.Collections\.Generic\.IList\`1\.Insert\(System\.Int32,\`0\)')\. + +```csharp +public static void Move(this System.Collections.Generic.IList source, int oldIndex, int newIndex); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. +#### Parameters + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtensions.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).T 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') on which to perform the move\. + + + +`oldIndex` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The zero\-based index specifying the location of the item to be moved\. + + + +`newIndex` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The zero\-based index specifying the new location of the item\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtensions.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).source 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IListExtensions/index.md b/documentation/api/DefaultUnDo/IListExtensions/index.md new file mode 100644 index 0000000..053b40b --- /dev/null +++ b/documentation/api/DefaultUnDo/IListExtensions/index.md @@ -0,0 +1,17 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IListExtensions Class + +Provides a method to wrap an [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') to an UnDo list linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static class IListExtensions +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 IListExtensions + +| Methods | | +| :--- | :--- | +| [AsUnDo<T>\(this IList<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)') | Wraps an [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') to an UnDo list linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | +| [Move<T>\(this IList<T>, int, int\)](Move_T_(thisIList_T_,int,int).md 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)') | Moves the item at the specified index to a new location in the collection\. If [source](Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtensions.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).source 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)\.source') is an UnDo list and its inner source an [System\.Collections\.ObjectModel\.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System\.Collections\.ObjectModel\.ObservableCollection\`1'), it will use the [System\.Collections\.ObjectModel\.ObservableCollection<>\.Move\(System\.Int32,System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System\.Collections\.ObjectModel\.ObservableCollection\`1\.Move\(System\.Int32,System\.Int32\)') method; else it will do an [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)') and [System\.Collections\.Generic\.IList<>\.Insert\(System\.Int32,@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System\.Collections\.Generic\.IList\`1\.Insert\(System\.Int32,\`0\)')\. | diff --git a/documentation/api/DefaultUnDo/IMergeableUnDo/TryMerge(IUnDo,IUnDo).md b/documentation/api/DefaultUnDo/IMergeableUnDo/TryMerge(IUnDo,IUnDo).md new file mode 100644 index 0000000..015a51e --- /dev/null +++ b/documentation/api/DefaultUnDo/IMergeableUnDo/TryMerge(IUnDo,IUnDo).md @@ -0,0 +1,27 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IMergeableUnDo](index.md 'DefaultUnDo\.IMergeableUnDo') + +## IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\) Method + +Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +```csharp +bool TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); +``` +#### Parameters + + + +`other` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The other [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance the current one should try to merge with\. + + + +`mergedCommand` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The resulting merged [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance if the operation was successful\. + +#### Returns +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') +true if the merge was successful; otherwise false\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IMergeableUnDo/index.md b/documentation/api/DefaultUnDo/IMergeableUnDo/index.md new file mode 100644 index 0000000..a75941d --- /dev/null +++ b/documentation/api/DefaultUnDo/IMergeableUnDo/index.md @@ -0,0 +1,20 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IMergeableUnDo Interface + +Provides a method to try to merge two [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instances into a single one\. + +```csharp +public interface IMergeableUnDo : DefaultUnDo.IUnDo +``` + +Derived +↳ [GroupUnDo](../GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') +↳ [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') + +Implements [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Methods | | +| :--- | :--- | +| [TryMerge\(IUnDo, IUnDo\)](TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)') | Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. | diff --git a/documentation/api/DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md new file mode 100644 index 0000000..1a81920 --- /dev/null +++ b/documentation/api/DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md @@ -0,0 +1,45 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ISetExtensions](index.md 'DefaultUnDo\.ISetExtensions') + +## ISetExtensions\.AsUnDo\\(this ISet\, IUnDoManager, Func\\) Method + +Wraps an [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') to an UnDo set linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static System.Collections.Generic.ISet AsUnDo(this System.Collections.Generic.ISet source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')\. +#### Parameters + + + +`source` [System\.Collections\.Generic\.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')[T](DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') + +The [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')\. + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[UnDoCollectionOperation](../UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Returns +[System\.Collections\.Generic\.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')[T](DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') +A wrapped [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.source') or [manager](DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtensions.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ISetExtensions/index.md b/documentation/api/DefaultUnDo/ISetExtensions/index.md new file mode 100644 index 0000000..9673239 --- /dev/null +++ b/documentation/api/DefaultUnDo/ISetExtensions/index.md @@ -0,0 +1,16 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## ISetExtensions Class + +Provides a method to wrap an [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') to an UnDo set linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public static class ISetExtensions +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 ISetExtensions + +| Methods | | +| :--- | :--- | +| [AsUnDo<T>\(this ISet<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)') | Wraps an [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') to an UnDo set linked to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | diff --git a/documentation/api/DefaultUnDo/IUnDo/Description.md b/documentation/api/DefaultUnDo/IUnDo/Description.md new file mode 100644 index 0000000..f18f483 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDo/Description.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDo](index.md 'DefaultUnDo\.IUnDo') + +## IUnDo\.Description Property + +Gets a description of what this [IUnDo](index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? Description { get; } +``` + +#### Property Value +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDo/Do().md b/documentation/api/DefaultUnDo/IUnDo/Do().md new file mode 100644 index 0000000..62d4a89 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDo/Do().md @@ -0,0 +1,10 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDo](index.md 'DefaultUnDo\.IUnDo') + +## IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void Do(); +``` \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDo/Undo().md b/documentation/api/DefaultUnDo/IUnDo/Undo().md new file mode 100644 index 0000000..169e558 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDo/Undo().md @@ -0,0 +1,10 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDo](index.md 'DefaultUnDo\.IUnDo') + +## IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void Undo(); +``` \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDo/index.md b/documentation/api/DefaultUnDo/IUnDo/index.md new file mode 100644 index 0000000..87a48cc --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDo/index.md @@ -0,0 +1,28 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IUnDo Interface + +Provides methods to execute an action and remove its effect\. + +```csharp +public interface IUnDo +``` + +Derived +↳ [CollectionUnDo<T>](../CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\') +↳ [DictionaryUnDo<TKey,TValue>](../DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\') +↳ [GroupUnDo](../GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') +↳ [IMergeableUnDo](../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') +↳ [ListUnDo<T>](../ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\') +↳ [UnDo](../UnDo/index.md 'DefaultUnDo\.UnDo') +↳ [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') + +| Properties | | +| :--- | :--- | +| [Description](Description.md 'DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | + +| Methods | | +| :--- | :--- | +| [Do\(\)](Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [Undo\(\)](Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/IUnDoManager/BeginTransaction(object).md b/documentation/api/DefaultUnDo/IUnDoManager/BeginTransaction(object).md new file mode 100644 index 0000000..95e38af --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/BeginTransaction(object).md @@ -0,0 +1,22 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.BeginTransaction\(object\) Method + +Starts a group of operation and return an [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. +If [Commit\(\)](../IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. + +```csharp +DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the group of operations\. + +#### Returns +[IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') +An [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to commit or rollback the transaction of operations\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/CanRedo.md b/documentation/api/DefaultUnDo/IUnDoManager/CanRedo.md new file mode 100644 index 0000000..1ecd7bf --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/CanRedo.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.CanRedo Property + +Returns a boolean to express if the method [Redo\(\)](Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') can be executed\. + +```csharp +bool CanRedo { get; } +``` + +#### Property Value +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/CanUndo.md b/documentation/api/DefaultUnDo/IUnDoManager/CanUndo.md new file mode 100644 index 0000000..12a03c6 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/CanUndo.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.CanUndo Property + +Returns a boolean to express if the method [Undo\(\)](Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') can be executed\. + +```csharp +bool CanUndo { get; } +``` + +#### Property Value +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/Clear().md b/documentation/api/DefaultUnDo/IUnDoManager/Clear().md new file mode 100644 index 0000000..d97f6a9 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/Clear().md @@ -0,0 +1,10 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.Clear\(\) Method + +Clears the history of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +void Clear(); +``` \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/Do(IUnDo).md b/documentation/api/DefaultUnDo/IUnDoManager/Do(IUnDo).md new file mode 100644 index 0000000..a09110c --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/Do(IUnDo).md @@ -0,0 +1,22 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.Do\(IUnDo\) Method + +Executes the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. + +```csharp +void Do(DefaultUnDo.IUnDo command); +``` +#### Parameters + + + +`command` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') to execute\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[command](DefaultUnDo/IUnDoManager/Do(IUnDo).md#DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo).command 'DefaultUnDo\.IUnDoManager\.Do\(DefaultUnDo\.IUnDo\)\.command') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/Redo().md b/documentation/api/DefaultUnDo/IUnDoManager/Redo().md new file mode 100644 index 0000000..b317c1b --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/Redo().md @@ -0,0 +1,18 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.Redo\(\) Method + +Redoes the last undone [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + +```csharp +void Redo(); +``` + +#### Exceptions + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Cannot perform [Redo\(\)](DefaultUnDo/IUnDoManager/Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') while a group operation is going on\. + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +There is no action to redo\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/RedoDescriptions.md b/documentation/api/DefaultUnDo/IUnDoManager/RedoDescriptions.md new file mode 100644 index 0000000..b8e08a5 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/RedoDescriptions.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.RedoDescriptions Property + +Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. + +```csharp +System.Collections.Generic.IEnumerable RedoDescriptions { get; } +``` + +#### Property Value +[System\.Collections\.Generic\.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/Undo().md b/documentation/api/DefaultUnDo/IUnDoManager/Undo().md new file mode 100644 index 0000000..97752d9 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/Undo().md @@ -0,0 +1,18 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.Undo\(\) Method + +Undoes the last executed [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + +```csharp +void Undo(); +``` + +#### Exceptions + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Cannot perform [Undo\(\)](DefaultUnDo/IUnDoManager/Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') while a group operation is going on\. + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +There is no action to undo\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/UndoDescriptions.md b/documentation/api/DefaultUnDo/IUnDoManager/UndoDescriptions.md new file mode 100644 index 0000000..1ddb2c6 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/UndoDescriptions.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.UndoDescriptions Property + +Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. + +```csharp +System.Collections.Generic.IEnumerable UndoDescriptions { get; } +``` + +#### Property Value +[System\.Collections\.Generic\.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/Version.md b/documentation/api/DefaultUnDo/IUnDoManager/Version.md new file mode 100644 index 0000000..569be42 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/Version.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager') + +## IUnDoManager\.Version Property + +Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](index.md 'DefaultUnDo\.IUnDoManager')\. + +```csharp +int Version { get; } +``` + +#### Property Value +[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManager/index.md b/documentation/api/DefaultUnDo/IUnDoManager/index.md new file mode 100644 index 0000000..18ce692 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManager/index.md @@ -0,0 +1,31 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IUnDoManager Interface + +Provides properties and methods of the command pattern to execute operations and return to a previous state by undoing them\. + +```csharp +public interface IUnDoManager : System.ComponentModel.INotifyPropertyChanged +``` + +Derived +↳ [UnDoManager](../UnDoManager/index.md 'DefaultUnDo\.UnDoManager') + +Implements [System\.ComponentModel\.INotifyPropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged 'System\.ComponentModel\.INotifyPropertyChanged') + +| Properties | | +| :--- | :--- | +| [CanRedo](CanRedo.md 'DefaultUnDo\.IUnDoManager\.CanRedo') | Returns a boolean to express if the method [Redo\(\)](Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') can be executed\. | +| [CanUndo](CanUndo.md 'DefaultUnDo\.IUnDoManager\.CanUndo') | Returns a boolean to express if the method [Undo\(\)](Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') can be executed\. | +| [RedoDescriptions](RedoDescriptions.md 'DefaultUnDo\.IUnDoManager\.RedoDescriptions') | Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. | +| [UndoDescriptions](UndoDescriptions.md 'DefaultUnDo\.IUnDoManager\.UndoDescriptions') | Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. | +| [Version](Version.md 'DefaultUnDo\.IUnDoManager\.Version') | Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. | + +| Methods | | +| :--- | :--- | +| [BeginTransaction\(object\)](BeginTransaction(object).md 'DefaultUnDo\.IUnDoManager\.BeginTransaction\(object\)') | Starts a group of operation and return an [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. If [Commit\(\)](../IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. | +| [Clear\(\)](Clear().md 'DefaultUnDo\.IUnDoManager\.Clear\(\)') | Clears the history of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | +| [Do\(IUnDo\)](Do(IUnDo).md 'DefaultUnDo\.IUnDoManager\.Do\(DefaultUnDo\.IUnDo\)') | Executes the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. | +| [Redo\(\)](Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') | Redoes the last undone [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. | +| [Undo\(\)](Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') | Undoes the last executed [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. | diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/Do.md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/Do.md new file mode 100644 index 0000000..f29abd5 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/Do.md @@ -0,0 +1,216 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.Do Method + +| Overloads | | +| :--- | :--- | +| [Do\(this IUnDoManager, Action, Action, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\(this DefaultUnDo\.IUnDoManager, System\.Action, System\.Action, object\)') | Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified doAction and undoAction\. | +| [Do<T>\(this IUnDoManager, Action<T>, T, T, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)') | Sets a value as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [Do<T>\(this IUnDoManager, IList<T>, int, T, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)') | Sets the element at the specified index on a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [Do<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)') | Sets the element with the specified key on a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | + + + +## IUnDoManagerExtensions\.Do\(this IUnDoManager, Action, Action, object\) Method + +Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified doAction and undoAction\. + +```csharp +public static void Do(this DefaultUnDo.IUnDoManager manager, System.Action? doAction, System.Action? undoAction, object? description=null); +``` +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`doAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') performed by [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)')\. + + + +`undoAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') performed by the [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)')\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.Do\(this DefaultUnDo\.IUnDoManager, System\.Action, System\.Action, object\)\.manager') is null\. + + + +## IUnDoManagerExtensions\.Do\\(this IUnDoManager, Action\, T, T, object\) Method + +Sets a value as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void Do(this DefaultUnDo.IUnDoManager manager, System.Action setter, T newValue, T oldValue, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of the value\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`setter` [System\.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1')[T](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1') + +The [System\.Action<>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1') used to change the value\. + + + +`newValue` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)\.T') + +The new value\. + + + +`oldValue` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)\.T') + +The old value\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)\.manager') or [setter](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).setter 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)\.setter') is null\. + + + +## IUnDoManagerExtensions\.Do\\(this IUnDoManager, IList\, int, T, object\) Method + +Sets the element at the specified index on a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void Do(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, T item, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + + + +`index` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The zero\-based index of the element to get or set\. + + + +`item` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.T') + +The new item\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.manager') or [source](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.source') is null\. + + + +## IUnDoManagerExtensions\.Do\\(this IUnDoManager, IDictionary\, TKey, TValue, object\) Method + +Sets the element with the specified key on a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void Do(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, TValue value, object? description=null); +``` +#### Type parameters + + + +`TKey` + +The type of the key\. + + + +`TValue` + +The type of the value\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')\. + + + +`key` [TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TKey') + +The key to set\. + + + +`value` [TValue](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TValue') + +The value to add\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.manager'), [source](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.source') or [key](index.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).key 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.key') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoAdd.md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoAdd.md new file mode 100644 index 0000000..a7a0d9a --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoAdd.md @@ -0,0 +1,167 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoAdd Method + +| Overloads | | +| :--- | :--- | +| [DoAdd<T>\(this IUnDoManager, ICollection<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)') | Adds a value to a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoAdd<T>\(this IUnDoManager, ISet<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)') | Adds an item from a [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoAdd<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)') | Adds a value to a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | + + + +## IUnDoManagerExtensions\.DoAdd\\(this IUnDoManager, ICollection\, T, object\) Method + +Adds a value to a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, T item, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + + + +`item` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.T') + +The item to add\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.manager') or [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.source') is null\. + + + +## IUnDoManagerExtensions\.DoAdd\\(this IUnDoManager, ISet\, T, object\) Method + +Adds an item from a [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static bool DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ISet source, T item, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')[T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') + +The [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1')\. + + + +`item` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.T') + +The item to add\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Returns +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') +true if the command has been created, false if not because [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.source') already contained [item](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).item 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.item')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.manager') or [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)\.source') is null\. + + + +## IUnDoManagerExtensions\.DoAdd\\(this IUnDoManager, IDictionary\, TKey, TValue, object\) Method + +Adds a value to a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, TValue value, object? description=null); +``` +#### Type parameters + + + +`TKey` + +The type of the key\. + + + +`TValue` + +The type of the value\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')\. + + + +`key` [TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TKey') + +The key to add\. + + + +`value` [TValue](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.TValue') + +The value to add\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.manager'), [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.source') or [key](index.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).key 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)\.key') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md new file mode 100644 index 0000000..d139e90 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md @@ -0,0 +1,41 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoClear\\(this IUnDoManager, ICollection\, object\) Method + +Clears a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void DoClear(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtensions.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoClear\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtensions.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoClear\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, object\)\.manager') or [source](DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtensions.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoClear\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, object\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md new file mode 100644 index 0000000..e2e95b1 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md @@ -0,0 +1,53 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoInsert\\(this IUnDoManager, IList\, int, T, object\) Method + +Inserts an item to a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void DoInsert(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, T item, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtensions.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + + + +`index` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The zero\-based index at which item should be inserted\. + + + +`item` [T](DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtensions.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.T') + +The item to insert into the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtensions.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.manager') or [source](DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtensions.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md new file mode 100644 index 0000000..bb11be0 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md @@ -0,0 +1,34 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoOnDo\(this IUnDoManager, Action, object\) Method + +Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no undo\. + +```csharp +public static void DoOnDo(this DefaultUnDo.IUnDoManager manager, System.Action action, object? description=null); +``` +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`action` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') performed by [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)')\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md#DefaultUnDo.IUnDoManagerExtensions.DoOnDo(thisDefaultUnDo.IUnDoManager,System.Action,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnDo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md new file mode 100644 index 0000000..353f424 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md @@ -0,0 +1,34 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoOnUndo\(this IUnDoManager, Action, object\) Method + +Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no do\. + +```csharp +public static void DoOnUndo(this DefaultUnDo.IUnDoManager manager, System.Action action, object? description=null); +``` +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`action` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') performed by [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)')\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md#DefaultUnDo.IUnDoManagerExtensions.DoOnUndo(thisDefaultUnDo.IUnDoManager,System.Action,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnUndo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemove.md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemove.md new file mode 100644 index 0000000..b609b1f --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemove.md @@ -0,0 +1,117 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoRemove Method + +| Overloads | | +| :--- | :--- | +| [DoRemove<T>\(this IUnDoManager, ICollection<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)') | Removes an item from a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoRemove<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, object\)](DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)') | Removes the item with the specified key from a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | + + + +## IUnDoManagerExtensions\.DoRemove\\(this IUnDoManager, ICollection\, T, object\) Method + +Removes an item from a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static bool DoRemove(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, T item, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')[T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') + +The [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1')\. + + + +`item` [T](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.T') + +The item to remove\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Returns +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') +true if the command has been created, false if not because [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.source') did not contained [item](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).item 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.item')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.manager') or [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)\.source') is null\. + + + +## IUnDoManagerExtensions\.DoRemove\\(this IUnDoManager, IDictionary\, TKey, object\) Method + +Removes the item with the specified key from a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static bool DoRemove(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, object? description=null); +``` +#### Type parameters + + + +`TKey` + +The type of the key\. + + + +`TValue` + +The type of the value\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')[TValue](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TValue 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') + +The [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2')\. + + + +`key` [TKey](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TKey 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.TKey') + +The key to remove\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Returns +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') +true if the command has been created, false if not because [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.source') did not contained [key](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).key 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.key')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.manager'), [source](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.source') or [key](index.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).key 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)\.key') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md new file mode 100644 index 0000000..a1acd5e --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md @@ -0,0 +1,47 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtensions](index.md 'DefaultUnDo\.IUnDoManagerExtensions') + +## IUnDoManagerExtensions\.DoRemoveAt\\(this IUnDoManager, IList\, int, object\) Method + +Removes an item from a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +public static void DoRemoveAt(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, object? description=null); +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtensions.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).T 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemoveAt\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, object\)\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + + + +`index` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The zero\-based index at which item should be removed\. + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the operation\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtensions.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).manager 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemoveAt\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, object\)\.manager') or [source](DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtensions.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).source 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemoveAt\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, object\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoManagerExtensions/index.md b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/index.md new file mode 100644 index 0000000..0b6145b --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoManagerExtensions/index.md @@ -0,0 +1,29 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IUnDoManagerExtensions Class + +Provides methods to create [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command and add them to an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + +```csharp +public static class IUnDoManagerExtensions +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 IUnDoManagerExtensions + +| Methods | | +| :--- | :--- | +| [Do\(this IUnDoManager, Action, Action, object\)](Do.md#DefaultUnDo.IUnDoManagerExtensions.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\(this DefaultUnDo\.IUnDoManager, System\.Action, System\.Action, object\)') | Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified doAction and undoAction\. | +| [Do<T>\(this IUnDoManager, Action<T>, T, T, object\)](Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)') | Sets a value as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [Do<T>\(this IUnDoManager, IList<T>, int, T, object\)](Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)') | Sets the element at the specified index on a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [Do<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)') | Sets the element with the specified key on a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoAdd<T>\(this IUnDoManager, ICollection<T>, T, object\)](DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)') | Adds a value to a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoAdd<T>\(this IUnDoManager, ISet<T>, T, object\)](DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)') | Adds an item from a [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoAdd<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)') | Adds a value to a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoClear<T>\(this IUnDoManager, ICollection<T>, object\)](DoClear_T_(thisIUnDoManager,ICollection_T_,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoClear\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, object\)') | Clears a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoInsert<T>\(this IUnDoManager, IList<T>, int, T, object\)](DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)') | Inserts an item to a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoOnDo\(this IUnDoManager, Action, object\)](DoOnDo(thisIUnDoManager,Action,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnDo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)') | Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no undo\. | +| [DoOnUndo\(this IUnDoManager, Action, object\)](DoOnUndo(thisIUnDoManager,Action,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnUndo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)') | Does a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no do\. | +| [DoRemove<T>\(this IUnDoManager, ICollection<T>, T, object\)](DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)') | Removes an item from a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoRemove<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, object\)](DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)') | Removes the item with the specified key from a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [DoRemoveAt<T>\(this IUnDoManager, IList<T>, int, object\)](DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemoveAt\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, object\)') | Removes an item from a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | diff --git a/documentation/api/DefaultUnDo/IUnDoTransaction/Commit().md b/documentation/api/DefaultUnDo/IUnDoTransaction/Commit().md new file mode 100644 index 0000000..ae39219 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoTransaction/Commit().md @@ -0,0 +1,21 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[IUnDoTransaction](index.md 'DefaultUnDo\.IUnDoTransaction') + +## IUnDoTransaction\.Commit\(\) Method + +Groups all recorded operations in a single [GroupUnDo](../GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and add it to the history of the [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') instance this instance was created from\. +If this method is not called before disposing current instance, all recorded operations will be undone\. + +```csharp +void Commit(); +``` + +#### Exceptions + +[System\.ObjectDisposedException](https://docs.microsoft.com/en-us/dotnet/api/System.ObjectDisposedException 'System\.ObjectDisposedException') + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Current transaction has already been committed + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Current transaction is not the highest one on the stack \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/IUnDoTransaction/index.md b/documentation/api/DefaultUnDo/IUnDoTransaction/index.md new file mode 100644 index 0000000..b5bdaf4 --- /dev/null +++ b/documentation/api/DefaultUnDo/IUnDoTransaction/index.md @@ -0,0 +1,16 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## IUnDoTransaction Interface + +Represents a transaction to record multiple undo operations as a single operation in the history of a [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + +```csharp +public interface IUnDoTransaction : System.IDisposable +``` + +Implements [System\.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System\.IDisposable') + +| Methods | | +| :--- | :--- | +| [Commit\(\)](Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') | Groups all recorded operations in a single [GroupUnDo](../GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and add it to the history of the [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') instance this instance was created from\. If this method is not called before disposing current instance, all recorded operations will be undone\. | diff --git a/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..5428467 --- /dev/null +++ b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\') + +## ListUnDo\\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..7379a9b --- /dev/null +++ b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\') + +## ListUnDo\\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..cac4452 --- /dev/null +++ b/documentation/api/DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\') + +## ListUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md b/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md new file mode 100644 index 0000000..4ba9a0a --- /dev/null +++ b/documentation/api/DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md @@ -0,0 +1,95 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\') + +## ListUnDo\ Constructors + +| Overloads | | +| :--- | :--- | +| [ListUnDo\(object, IList<T>, int, T, bool\)](DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(object, System\.Collections\.Generic\.IList\, int, T, bool\)') | Initialises an instance of [ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\')\. | +| [ListUnDo\(IList<T>, int, T, bool\)](DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(System\.Collections\.Generic\.IList\, int, T, bool\)') | Initialises an instance of [ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\')\. | + + + +## ListUnDo\(object, IList\, int, T, bool\) Constructor + +Initialises an instance of [ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\')\. + +```csharp +public ListUnDo(object? description, System.Collections.Generic.IList source, int index, T item, bool isAdd); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](index.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo\.ListUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') on which the operation is performed\. + + + +`index` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The index of the operation\. + + + +`item` [T](index.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo\.ListUnDo\\.T') + +The argument of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is an [System\.Collections\.Generic\.IList<>\.IndexOf\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.IndexOf#System_Collections_Generic_IList_1_IndexOf__0_ 'System\.Collections\.Generic\.IList\`1\.IndexOf\(\`0\)'), else false for a [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool).source 'DefaultUnDo\.ListUnDo\\.ListUnDo\(object, System\.Collections\.Generic\.IList\, int, T, bool\)\.source') is null\. + + + +## ListUnDo\(IList\, int, T, bool\) Constructor + +Initialises an instance of [ListUnDo<T>](index.md 'DefaultUnDo\.ListUnDo\')\. + +```csharp +public ListUnDo(System.Collections.Generic.IList source, int index, T item, bool isAdd); +``` +#### Parameters + + + +`source` [System\.Collections\.Generic\.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')[T](index.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo\.ListUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') + +The [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') on which the operation is performed\. + + + +`index` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The index of the operation\. + + + +`item` [T](index.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo\.ListUnDo\\.T') + +The argument of the operation\. + + + +`isAdd` [System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') + +true if the operation is an [System\.Collections\.Generic\.IList<>\.IndexOf\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.IndexOf#System_Collections_Generic_IList_1_IndexOf__0_ 'System\.Collections\.Generic\.IList\`1\.IndexOf\(\`0\)'), else false for a [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[source](index.md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool).source 'DefaultUnDo\.ListUnDo\\.ListUnDo\(System\.Collections\.Generic\.IList\, int, T, bool\)\.source') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ListUnDo_T_/index.md b/documentation/api/DefaultUnDo/ListUnDo_T_/index.md new file mode 100644 index 0000000..d60c7b2 --- /dev/null +++ b/documentation/api/DefaultUnDo/ListUnDo_T_/index.md @@ -0,0 +1,32 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## ListUnDo\ Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') operation\. + +```csharp +public sealed class ListUnDo : DefaultUnDo.IUnDo +``` +#### Type parameters + + + +`T` + +The type of element in the [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1')\. + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 ListUnDo + +Implements [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [ListUnDo\(object, IList<T>, int, T, bool\)](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(object, System\.Collections\.Generic\.IList\, int, T, bool\)') | Initialises an instance of [ListUnDo<T>](DefaultUnDo/ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\')\. | +| [ListUnDo\(IList<T>, int, T, bool\)](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(System\.Collections\.Generic\.IList\, int, T, bool\)') | Initialises an instance of [ListUnDo<T>](DefaultUnDo/ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\')\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..91003c2 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDo](index.md 'DefaultUnDo\.UnDo') + +## UnDo\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..1e8aef4 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDo](index.md 'DefaultUnDo\.UnDo') + +## UnDo\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..52a0f4b --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDo](index.md 'DefaultUnDo\.UnDo') + +## UnDo\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDo/UnDo.md b/documentation/api/DefaultUnDo/UnDo/UnDo.md new file mode 100644 index 0000000..888dde9 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDo/UnDo.md @@ -0,0 +1,61 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDo](index.md 'DefaultUnDo\.UnDo') + +## UnDo Constructors + +| Overloads | | +| :--- | :--- | +| [UnDo\(object, Action, Action\)](DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(object,System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(object, System\.Action, System\.Action\)') | Initialises an instance of [UnDo](index.md 'DefaultUnDo\.UnDo')\. | +| [UnDo\(Action, Action\)](DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(System\.Action, System\.Action\)') | Initialises an instance of [UnDo](index.md 'DefaultUnDo\.UnDo')\. | + + + +## UnDo\(object, Action, Action\) Constructor + +Initialises an instance of [UnDo](index.md 'DefaultUnDo\.UnDo')\. + +```csharp +public UnDo(object? description, System.Action? doAction, System.Action? undoAction); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`doAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The action called by [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)')\. + + + +`undoAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The action called by [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)')\. + + + +## UnDo\(Action, Action\) Constructor + +Initialises an instance of [UnDo](index.md 'DefaultUnDo\.UnDo')\. + +```csharp +public UnDo(System.Action? doAction, System.Action? undoAction); +``` +#### Parameters + + + +`doAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The action called by [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)')\. + + + +`undoAction` [System\.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System\.Action') + +The action called by [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)')\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDo/index.md b/documentation/api/DefaultUnDo/UnDo/index.md new file mode 100644 index 0000000..26e8f7b --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDo/index.md @@ -0,0 +1,25 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDo Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for custom do and undo action\. + +```csharp +public sealed class UnDo : DefaultUnDo.IUnDo +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 UnDo + +Implements [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [UnDo\(object, Action, Action\)](UnDo.md#DefaultUnDo.UnDo.UnDo(object,System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(object, System\.Action, System\.Action\)') | Initialises an instance of [UnDo](DefaultUnDo/UnDo/index.md 'DefaultUnDo\.UnDo')\. | +| [UnDo\(Action, Action\)](UnDo.md#DefaultUnDo.UnDo.UnDo(System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(System\.Action, System\.Action\)') | Initialises an instance of [UnDo](DefaultUnDo/UnDo/index.md 'DefaultUnDo\.UnDo')\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DefaultUnDo/UnDoCollectionAction/index.md b/documentation/api/DefaultUnDo/UnDoCollectionAction/index.md new file mode 100644 index 0000000..8ac483e --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionAction/index.md @@ -0,0 +1,101 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDoCollectionAction Enum + +Describes the action that will be performed on an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') and recorded by an [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + +```csharp +public enum UnDoCollectionAction +``` +### Fields + + + +`ICollectionAdd` 0 + +[System\.Collections\.Generic\.ICollection<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System\.Collections\.Generic\.ICollection\`1\.Add\(\`0\)') will be performed\. + + + +`ICollectionRemove` 1 + +[System\.Collections\.Generic\.ICollection<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System\.Collections\.Generic\.ICollection\`1\.Remove\(\`0\)') will be performed\. + + + +`ICollectionClear` 2 + +[System\.Collections\.Generic\.ICollection<>\.Clear](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Clear 'System\.Collections\.Generic\.ICollection\`1\.Clear') will be performed\. + + + +`ISetAdd` 3 + +[System\.Collections\.Generic\.ISet<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.Add#System_Collections_Generic_ISet_1_Add__0_ 'System\.Collections\.Generic\.ISet\`1\.Add\(\`0\)') will be performed\. + + + +`ISetExceptWith` 4 + +[System\.Collections\.Generic\.ISet<>\.ExceptWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.ExceptWith#System_Collections_Generic_ISet_1_ExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.ExceptWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + + + +`ISetIntersectWith` 5 + +[System\.Collections\.Generic\.ISet<>\.IntersectWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.IntersectWith#System_Collections_Generic_ISet_1_IntersectWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.IntersectWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + + + +`ISetSymmetricExceptWith` 6 + +[System\.Collections\.Generic\.ISet<>\.SymmetricExceptWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.SymmetricExceptWith#System_Collections_Generic_ISet_1_SymmetricExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.SymmetricExceptWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + + + +`ISetUnionWith` 7 + +[System\.Collections\.Generic\.ISet<>\.UnionWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.UnionWith#System_Collections_Generic_ISet_1_UnionWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.UnionWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + + + +`IListMove` 8 + +[Move<T>\(this IList<T>, int, int\)](../IListExtensions/Move_T_(thisIList_T_,int,int).md 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)') will be performed\. + + + +`IListInsert` 9 + +[System\.Collections\.Generic\.IList<>\.Insert\(System\.Int32,@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System\.Collections\.Generic\.IList\`1\.Insert\(System\.Int32,\`0\)') will be performed\. + + + +`IListRemoveAt` 10 + +[System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)') will be performed\. + + + +`IListIndexer` 11 + +[System\.Collections\.Generic\.IList<>\.Item\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Item#System_Collections_Generic_IList_1_Item_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.Item\(System\.Int32\)') will be performed\. + + + +`IDictionaryAdd` 12 + +[System\.Collections\.Generic\.IDictionary<>\.Add\(@0,@1\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System\.Collections\.Generic\.IDictionary\`2\.Add\(\`0,\`1\)') will be performed\. + + + +`IDictionaryRemove` 13 + +[System\.Collections\.Generic\.IDictionary<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System\.Collections\.Generic\.IDictionary\`2\.Remove\(\`0\)') will be performed\. + + + +`IDictionaryIndexer` 14 + +[System\.Collections\.Generic\.IDictionary<>\.Item\(@@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Item#System_Collections_Generic_IDictionary_2_Item___0_ 'System\.Collections\.Generic\.IDictionary\`2\.Item\(\`\`0\)') will be performed\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoCollectionOperation/Action.md b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Action.md new file mode 100644 index 0000000..6e66b57 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Action.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](index.md 'DefaultUnDo\.UnDoCollectionOperation') + +## UnDoCollectionOperation\.Action Property + +The action performed\. + +```csharp +public DefaultUnDo.UnDoCollectionAction Action { get; init; } +``` + +#### Property Value +[UnDoCollectionAction](../UnDoCollectionAction/index.md 'DefaultUnDo\.UnDoCollectionAction') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoCollectionOperation/Collection.md b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Collection.md new file mode 100644 index 0000000..e1de16a --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Collection.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](index.md 'DefaultUnDo\.UnDoCollectionOperation') + +## UnDoCollectionOperation\.Collection Property + +The collection on which the action is performed\. + +```csharp +public object Collection { get; init; } +``` + +#### Property Value +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoCollectionOperation/Parameters.md b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Parameters.md new file mode 100644 index 0000000..149f40b --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionOperation/Parameters.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](index.md 'DefaultUnDo\.UnDoCollectionOperation') + +## UnDoCollectionOperation\.Parameters Property + +The parameters of the action performed\. + +```csharp +public object?[] Parameters { get; init; } +``` + +#### Property Value +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[\[\]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System\.Array') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md b/documentation/api/DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md new file mode 100644 index 0000000..8d14030 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md @@ -0,0 +1,29 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](index.md 'DefaultUnDo\.UnDoCollectionOperation') + +## UnDoCollectionOperation\(object, UnDoCollectionAction, object\[\]\) Constructor + +Provides data for the operation about to be performed on an undo collection\. + +```csharp +public UnDoCollectionOperation(object Collection, DefaultUnDo.UnDoCollectionAction Action, params object?[] Parameters); +``` +#### Parameters + + + +`Collection` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The collection on which the action is performed\. + + + +`Action` [UnDoCollectionAction](../UnDoCollectionAction/index.md 'DefaultUnDo\.UnDoCollectionAction') + +The action performed\. + + + +`Parameters` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[\[\]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System\.Array') + +The parameters of the action performed\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoCollectionOperation/index.md b/documentation/api/DefaultUnDo/UnDoCollectionOperation/index.md new file mode 100644 index 0000000..8db9883 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoCollectionOperation/index.md @@ -0,0 +1,22 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDoCollectionOperation Struct + +Provides data for the operation about to be performed on an undo collection\. + +```csharp +public readonly record struct UnDoCollectionOperation : System.IEquatable +``` + +Implements [System\.IEquatable<](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System\.IEquatable\`1')[UnDoCollectionOperation](DefaultUnDo/UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')[>](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System\.IEquatable\`1') + +| Constructors | | +| :--- | :--- | +| [UnDoCollectionOperation\(object, UnDoCollectionAction, object\[\]\)](UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md 'DefaultUnDo\.UnDoCollectionOperation\.UnDoCollectionOperation\(object, DefaultUnDo\.UnDoCollectionAction, object\[\]\)') | Provides data for the operation about to be performed on an undo collection\. | + +| Properties | | +| :--- | :--- | +| [Action](Action.md 'DefaultUnDo\.UnDoCollectionOperation\.Action') | The action performed\. | +| [Collection](Collection.md 'DefaultUnDo\.UnDoCollectionOperation\.Collection') | The collection on which the action is performed\. | +| [Parameters](Parameters.md 'DefaultUnDo\.UnDoCollectionOperation\.Parameters') | The parameters of the action performed\. | diff --git a/documentation/api/DefaultUnDo/UnDoFieldChange_T_/NewValue.md b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/NewValue.md new file mode 100644 index 0000000..325452e --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/NewValue.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](index.md 'DefaultUnDo\.UnDoFieldChange\') + +## UnDoFieldChange\\.NewValue Property + +The field new value\. + +```csharp +public T? NewValue { get; init; } +``` + +#### Property Value +[T](index.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo\.UnDoFieldChange\\.T') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoFieldChange_T_/OldValue.md b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/OldValue.md new file mode 100644 index 0000000..3b79f7e --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/OldValue.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](index.md 'DefaultUnDo\.UnDoFieldChange\') + +## UnDoFieldChange\\.OldValue Property + +The field old value\. + +```csharp +public T? OldValue { get; init; } +``` + +#### Property Value +[T](index.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo\.UnDoFieldChange\\.T') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoFieldChange_T_/UnDoFieldChange(T,T).md b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/UnDoFieldChange(T,T).md new file mode 100644 index 0000000..b4f5fae --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/UnDoFieldChange(T,T).md @@ -0,0 +1,23 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](index.md 'DefaultUnDo\.UnDoFieldChange\') + +## UnDoFieldChange\(T, T\) Constructor + +Describes a value change operation done on a [UnDoField<T>](../UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + +```csharp +public UnDoFieldChange(T? OldValue, T? NewValue); +``` +#### Parameters + + + +`OldValue` [T](index.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo\.UnDoFieldChange\\.T') + +The field old value\. + + + +`NewValue` [T](index.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo\.UnDoFieldChange\\.T') + +The field new value\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoFieldChange_T_/index.md b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/index.md new file mode 100644 index 0000000..f4f72b2 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoFieldChange_T_/index.md @@ -0,0 +1,28 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDoFieldChange\ Struct + +Describes a value change operation done on a [UnDoField<T>](../UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + +```csharp +public readonly record struct UnDoFieldChange : System.IEquatable> +``` +#### Type parameters + + + +`T` + +The type of the field\. + +Implements [System\.IEquatable<](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System\.IEquatable\`1')[DefaultUnDo\.UnDoFieldChange<](DefaultUnDo/UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[T](DefaultUnDo/UnDoFieldChange_T_/index.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo\.UnDoFieldChange\\.T')[>](DefaultUnDo/UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[>](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System\.IEquatable\`1') + +| Constructors | | +| :--- | :--- | +| [UnDoFieldChange\(T, T\)](UnDoFieldChange(T,T).md 'DefaultUnDo\.UnDoFieldChange\\.UnDoFieldChange\(T, T\)') | Describes a value change operation done on a [UnDoField<T>](../UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. | + +| Properties | | +| :--- | :--- | +| [NewValue](NewValue.md 'DefaultUnDo\.UnDoFieldChange\\.NewValue') | The field new value\. | +| [OldValue](OldValue.md 'DefaultUnDo\.UnDoFieldChange\\.OldValue') | The field old value\. | diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/PostSet(T).md b/documentation/api/DefaultUnDo/UnDoField_T_/PostSet(T).md new file mode 100644 index 0000000..24d13de --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/PostSet(T).md @@ -0,0 +1,17 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + +## UnDoField\\.PostSet\(T\) Method + +performs a post set treatment, included in the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +protected virtual void PostSet(T oldValue); +``` +#### Parameters + + + +`oldValue` [T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T') + +The old value\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/PreSet(T).md b/documentation/api/DefaultUnDo/UnDoField_T_/PreSet(T).md new file mode 100644 index 0000000..e8ffb7d --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/PreSet(T).md @@ -0,0 +1,17 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + +## UnDoField\\.PreSet\(T\) Method + +Performs a pre set treatment, included in the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + +```csharp +protected virtual void PreSet(T newValue); +``` +#### Parameters + + + +`newValue` [T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T') + +The new value\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/UnDoField_T_.md b/documentation/api/DefaultUnDo/UnDoField_T_/UnDoField_T_.md new file mode 100644 index 0000000..dde314a --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/UnDoField_T_.md @@ -0,0 +1,71 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + +## UnDoField\ Constructors + +| Overloads | | +| :--- | :--- | +| [UnDoField\(IUnDoManager, Func<UnDoFieldChange<T>,object>\)](DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, System\.Func\,object\>\)') | Creates a new instance of [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\')\. | +| [UnDoField\(IUnDoManager, T, Func<UnDoFieldChange<T>,object>\)](DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, T, System\.Func\,object\>\)') | Creates a new instance of [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\')\. | + + + +## UnDoField\(IUnDoManager, Func\,object\>\) Constructor + +Creates a new instance of [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\')\. + +```csharp +public UnDoField(DefaultUnDo.IUnDoManager manager, System.Func,object?>? descriptionFactory=null); +``` +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') used to register the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[DefaultUnDo\.UnDoFieldChange<](../UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T')[>](../UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_).manager 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, System\.Func\,object\>\)\.manager') is null\. + + + +## UnDoField\(IUnDoManager, T, Func\,object\>\) Constructor + +Creates a new instance of [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\')\. + +```csharp +public UnDoField(DefaultUnDo.IUnDoManager manager, T value, System.Func,object?>? descriptionFactory=null); +``` +#### Parameters + + + +`manager` [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') + +The [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') used to register the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + + + +`value` [T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T') + +The starting value of the [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + + + +`descriptionFactory` [System\.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[DefaultUnDo\.UnDoFieldChange<](../UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T')[>](../UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System\.Func\`2') + +Factory used to create the description of the generated [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[manager](index.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_).manager 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, T, System\.Func\,object\>\)\.manager') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/Value.md b/documentation/api/DefaultUnDo/UnDoField_T_/Value.md new file mode 100644 index 0000000..7f4b350 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/Value.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + +## UnDoField\\.Value Property + +Gets or sets the value of the field, generating a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on set\. + +```csharp +public T Value { get; set; } +``` + +#### Property Value +[T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/implicitoperatorT(UnDoField_T_).md b/documentation/api/DefaultUnDo/UnDoField_T_/implicitoperatorT(UnDoField_T_).md new file mode 100644 index 0000000..f51ecee --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/implicitoperatorT(UnDoField_T_).md @@ -0,0 +1,20 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') + +## UnDoField\\.implicit operator T\(UnDoField\\) Operator + +Defines an implicit conversion of a [UnDoField<T>](index.md 'DefaultUnDo\.UnDoField\') to a [T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T')\. + +```csharp +public static T implicit operator T(DefaultUnDo.UnDoField field); +``` +#### Parameters + + + +`field` [DefaultUnDo\.UnDoField<](index.md 'DefaultUnDo\.UnDoField\')[T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T')[>](index.md 'DefaultUnDo\.UnDoField\') + +The field to implicitely convert\. + +#### Returns +[T](index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoField_T_/index.md b/documentation/api/DefaultUnDo/UnDoField_T_/index.md new file mode 100644 index 0000000..4db02a2 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoField_T_/index.md @@ -0,0 +1,37 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDoField\ Class + +Provides a simple wrapper for a field to automatically generate [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public class UnDoField +``` +#### Type parameters + + + +`T` + +The type of the filed\. + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 UnDoField + +| Constructors | | +| :--- | :--- | +| [UnDoField\(IUnDoManager, Func<UnDoFieldChange<T>,object>\)](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, System\.Func\,object\>\)') | Creates a new instance of [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. | +| [UnDoField\(IUnDoManager, T, Func<UnDoFieldChange<T>,object>\)](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, T, System\.Func\,object\>\)') | Creates a new instance of [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. | + +| Properties | | +| :--- | :--- | +| [Value](Value.md 'DefaultUnDo\.UnDoField\\.Value') | Gets or sets the value of the field, generating a [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on set\. | + +| Methods | | +| :--- | :--- | +| [PostSet\(T\)](PostSet(T).md 'DefaultUnDo\.UnDoField\\.PostSet\(T\)') | performs a post set treatment, included in the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | +| [PreSet\(T\)](PreSet(T).md 'DefaultUnDo\.UnDoField\\.PreSet\(T\)') | Performs a pre set treatment, included in the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. | + +| Operators | | +| :--- | :--- | +| [implicit operator T\(UnDoField<T>\)](implicitoperatorT(UnDoField_T_).md 'DefaultUnDo\.UnDoField\\.op\_Implicit T\(DefaultUnDo\.UnDoField\\)') | Defines an implicit conversion of a [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\') to a [T](DefaultUnDo/UnDoField_T_/index.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo\.UnDoField\\.T')\. | diff --git a/documentation/api/DefaultUnDo/UnDoManager/BeginTransaction(object).md b/documentation/api/DefaultUnDo/UnDoManager/BeginTransaction(object).md new file mode 100644 index 0000000..06ced98 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/BeginTransaction(object).md @@ -0,0 +1,24 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.BeginTransaction\(object\) Method + +Starts a group of operation and return an [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. +If [Commit\(\)](../IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. + +```csharp +public DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the group of operations\. + +Implements [BeginTransaction\(object\)](../IUnDoManager/BeginTransaction(object).md 'DefaultUnDo\.IUnDoManager\.BeginTransaction\(object\)') + +#### Returns +[IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') +An [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to commit or rollback the transaction of operations\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/CanRedo.md b/documentation/api/DefaultUnDo/UnDoManager/CanRedo.md new file mode 100644 index 0000000..9d211aa --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/CanRedo.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.CanRedo Property + +Returns a boolean to express if the method [Redo\(\)](Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)') can be executed\. + +```csharp +public bool CanRedo { get; } +``` + +Implements [CanRedo](../IUnDoManager/CanRedo.md 'DefaultUnDo\.IUnDoManager\.CanRedo') + +#### Property Value +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/CanUndo.md b/documentation/api/DefaultUnDo/UnDoManager/CanUndo.md new file mode 100644 index 0000000..4864cb8 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/CanUndo.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.CanUndo Property + +Returns a boolean to express if the method [Undo\(\)](Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)') can be executed\. + +```csharp +public bool CanUndo { get; } +``` + +Implements [CanUndo](../IUnDoManager/CanUndo.md 'DefaultUnDo\.IUnDoManager\.CanUndo') + +#### Property Value +[System\.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System\.Boolean') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/Clear().md b/documentation/api/DefaultUnDo/UnDoManager/Clear().md new file mode 100644 index 0000000..9f57c4e --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/Clear().md @@ -0,0 +1,17 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.Clear\(\) Method + +Clears the history of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + +```csharp +public void Clear(); +``` + +Implements [Clear\(\)](../IUnDoManager/Clear().md 'DefaultUnDo\.IUnDoManager\.Clear\(\)') + +#### Exceptions + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Cannot perform Clear while a transaction is going on\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/Do(IUnDo).md b/documentation/api/DefaultUnDo/UnDoManager/Do(IUnDo).md new file mode 100644 index 0000000..c0177ff --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/Do(IUnDo).md @@ -0,0 +1,24 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.Do\(IUnDo\) Method + +Executes the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. + +```csharp +public void Do(DefaultUnDo.IUnDo command); +``` +#### Parameters + + + +`command` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') to execute\. + +Implements [Do\(IUnDo\)](../IUnDoManager/Do(IUnDo).md 'DefaultUnDo\.IUnDoManager\.Do\(DefaultUnDo\.IUnDo\)') + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[command](DefaultUnDo/UnDoManager/Do(IUnDo).md#DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo).command 'DefaultUnDo\.UnDoManager\.Do\(DefaultUnDo\.IUnDo\)\.command') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/PropertyChanged.md b/documentation/api/DefaultUnDo/UnDoManager/PropertyChanged.md new file mode 100644 index 0000000..88be1a6 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/PropertyChanged.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.PropertyChanged Event + +Occurs when a property value changes\. + +```csharp +public event PropertyChangedEventHandler? PropertyChanged; +``` + +Implements [PropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged.PropertyChanged 'System\.ComponentModel\.INotifyPropertyChanged\.PropertyChanged') + +#### Event Type +[System\.ComponentModel\.PropertyChangedEventHandler](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.PropertyChangedEventHandler 'System\.ComponentModel\.PropertyChangedEventHandler') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/Redo().md b/documentation/api/DefaultUnDo/UnDoManager/Redo().md new file mode 100644 index 0000000..a6737c4 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/Redo().md @@ -0,0 +1,20 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.Redo\(\) Method + +Redoes the last undone [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + +```csharp +public void Redo(); +``` + +Implements [Redo\(\)](../IUnDoManager/Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') + +#### Exceptions + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Cannot perform [Redo\(\)](DefaultUnDo/UnDoManager/Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)') while a group operation is going on\. + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +There is no action to redo\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/RedoDescriptions.md b/documentation/api/DefaultUnDo/UnDoManager/RedoDescriptions.md new file mode 100644 index 0000000..48b79c5 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/RedoDescriptions.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.RedoDescriptions Property + +Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. + +```csharp +public System.Collections.Generic.IEnumerable RedoDescriptions { get; } +``` + +Implements [RedoDescriptions](../IUnDoManager/RedoDescriptions.md 'DefaultUnDo\.IUnDoManager\.RedoDescriptions') + +#### Property Value +[System\.Collections\.Generic\.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md b/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md new file mode 100644 index 0000000..0ae2702 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/UnDoManager.md @@ -0,0 +1,36 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager Constructors + +| Overloads | | +| :--- | :--- | +| [UnDoManager\(\)](DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager() 'DefaultUnDo\.UnDoManager\.UnDoManager\(\)') | Initialises an instance of [UnDoManager](index.md 'DefaultUnDo\.UnDoManager')\. | +| [UnDoManager\(int\)](DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager(int) 'DefaultUnDo\.UnDoManager\.UnDoManager\(int\)') | Initialises an instance of [UnDoManager](index.md 'DefaultUnDo\.UnDoManager')\. | + + + +## UnDoManager\(\) Constructor + +Initialises an instance of [UnDoManager](index.md 'DefaultUnDo\.UnDoManager')\. + +```csharp +public UnDoManager(); +``` + + + +## UnDoManager\(int\) Constructor + +Initialises an instance of [UnDoManager](index.md 'DefaultUnDo\.UnDoManager')\. + +```csharp +public UnDoManager(int maxCapacity); +``` +#### Parameters + + + +`maxCapacity` [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') + +The maximum number of operation this [UnDoManager](index.md 'DefaultUnDo\.UnDoManager') can record before errasing oldest ones\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/Undo().md b/documentation/api/DefaultUnDo/UnDoManager/Undo().md new file mode 100644 index 0000000..79349ce --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/Undo().md @@ -0,0 +1,20 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.Undo\(\) Method + +Undoes the last executed [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + +```csharp +public void Undo(); +``` + +Implements [Undo\(\)](../IUnDoManager/Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') + +#### Exceptions + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +Cannot perform [Undo\(\)](DefaultUnDo/UnDoManager/Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)') while a group operation is going on\. + +[System\.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System\.InvalidOperationException') +There is no action to undo\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/UndoDescriptions.md b/documentation/api/DefaultUnDo/UnDoManager/UndoDescriptions.md new file mode 100644 index 0000000..1e1eece --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/UndoDescriptions.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.UndoDescriptions Property + +Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. + +```csharp +public System.Collections.Generic.IEnumerable UndoDescriptions { get; } +``` + +Implements [UndoDescriptions](../IUnDoManager/UndoDescriptions.md 'DefaultUnDo\.IUnDoManager\.UndoDescriptions') + +#### Property Value +[System\.Collections\.Generic\.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/Version.md b/documentation/api/DefaultUnDo/UnDoManager/Version.md new file mode 100644 index 0000000..72f8c58 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/Version.md @@ -0,0 +1,15 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](index.md 'DefaultUnDo\.UnDoManager') + +## UnDoManager\.Version Property + +Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + +```csharp +public int Version { get; } +``` + +Implements [Version](../IUnDoManager/Version.md 'DefaultUnDo\.IUnDoManager\.Version') + +#### Property Value +[System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/UnDoManager/index.md b/documentation/api/DefaultUnDo/UnDoManager/index.md new file mode 100644 index 0000000..2b12f68 --- /dev/null +++ b/documentation/api/DefaultUnDo/UnDoManager/index.md @@ -0,0 +1,39 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## UnDoManager Class + +Provides an implementation of the command pattern to execute operations and return to a previous state by undoing them\. + +```csharp +public sealed class UnDoManager : DefaultUnDo.IUnDoManager, System.ComponentModel.INotifyPropertyChanged +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 UnDoManager + +Implements [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager'), [System\.ComponentModel\.INotifyPropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged 'System\.ComponentModel\.INotifyPropertyChanged') + +| Constructors | | +| :--- | :--- | +| [UnDoManager\(\)](UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager() 'DefaultUnDo\.UnDoManager\.UnDoManager\(\)') | Initialises an instance of [UnDoManager](DefaultUnDo/UnDoManager/index.md 'DefaultUnDo\.UnDoManager')\. | +| [UnDoManager\(int\)](UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager(int) 'DefaultUnDo\.UnDoManager\.UnDoManager\(int\)') | Initialises an instance of [UnDoManager](DefaultUnDo/UnDoManager/index.md 'DefaultUnDo\.UnDoManager')\. | + +| Properties | | +| :--- | :--- | +| [CanRedo](CanRedo.md 'DefaultUnDo\.UnDoManager\.CanRedo') | Returns a boolean to express if the method [Redo\(\)](Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)') can be executed\. | +| [CanUndo](CanUndo.md 'DefaultUnDo\.UnDoManager\.CanUndo') | Returns a boolean to express if the method [Undo\(\)](Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)') can be executed\. | +| [RedoDescriptions](RedoDescriptions.md 'DefaultUnDo\.UnDoManager\.RedoDescriptions') | Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. | +| [UndoDescriptions](UndoDescriptions.md 'DefaultUnDo\.UnDoManager\.UndoDescriptions') | Gets the descriptions in order of all the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. | +| [Version](Version.md 'DefaultUnDo\.UnDoManager\.Version') | Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](../IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. | + +| Methods | | +| :--- | :--- | +| [BeginTransaction\(object\)](BeginTransaction(object).md 'DefaultUnDo\.UnDoManager\.BeginTransaction\(object\)') | Starts a group of operation and return an [IUnDoTransaction](../IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. If [Commit\(\)](../IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. | +| [Clear\(\)](Clear().md 'DefaultUnDo\.UnDoManager\.Clear\(\)') | Clears the history of [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. | +| [Do\(IUnDo\)](Do(IUnDo).md 'DefaultUnDo\.UnDoManager\.Do\(DefaultUnDo\.IUnDo\)') | Executes the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. | +| [Redo\(\)](Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)') | Redoes the last undone [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. | +| [Undo\(\)](Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)') | Undoes the last executed [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. | + +| Events | | +| :--- | :--- | +| [PropertyChanged](PropertyChanged.md 'DefaultUnDo\.UnDoManager\.PropertyChanged') | Occurs when a property value changes\. | diff --git a/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionAction.md b/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionAction.md new file mode 100644 index 0000000..3977e38 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionAction.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](index.md 'DefaultUnDo\.ValueUnDo') + +## ValueUnDo\.MergeDescriptionAction Property + +The [MergeDescriptionHandler\(object, object\)](MergeDescriptionHandler(object,object)/index.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler\(object, object\)') used to merge description between two [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instance\. + +```csharp +public static DefaultUnDo.ValueUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } +``` + +#### Property Value +[MergeDescriptionHandler\(object, object\)](MergeDescriptionHandler(object,object)/index.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler\(object, object\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md b/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md new file mode 100644 index 0000000..94b0728 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md @@ -0,0 +1,26 @@ +#### [DefaultUnDo](../../../index.md 'index') +### [DefaultUnDo](../../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](../index.md 'DefaultUnDo\.ValueUnDo') + +## ValueUnDo\.MergeDescriptionHandler\(object, object\) Delegate + +Represents a method that will be called when merging two [ValueUnDo<T>](../../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances to get the resulting description\. + +```csharp +public delegate object? ValueUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription); +``` +#### Parameters + + + +`oldDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the previous [ValueUnDo<T>](../../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') merged\. + + + +`newDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the new [ValueUnDo<T>](../../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') merged\. + +#### Returns +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo/MergeInterval.md b/documentation/api/DefaultUnDo/ValueUnDo/MergeInterval.md new file mode 100644 index 0000000..c2c5680 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo/MergeInterval.md @@ -0,0 +1,14 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](index.md 'DefaultUnDo\.ValueUnDo') + +## ValueUnDo\.MergeInterval Property + +The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. +Default value is 500ms\. + +```csharp +public static System.TimeSpan MergeInterval { get; set; } +``` + +#### Property Value +[System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo/index.md b/documentation/api/DefaultUnDo/ValueUnDo/index.md new file mode 100644 index 0000000..3205352 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo/index.md @@ -0,0 +1,17 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## ValueUnDo Class + +Provides a global [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') to use as default merge interval for all [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. + +```csharp +public static class ValueUnDo +``` + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 ValueUnDo + +| Properties | | +| :--- | :--- | +| [MergeDescriptionAction](MergeDescriptionAction.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionAction') | The [MergeDescriptionHandler\(object, object\)](MergeDescriptionHandler(object,object)/index.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler\(object, object\)') used to merge description between two [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instance\. | +| [MergeInterval](MergeInterval.md 'DefaultUnDo\.ValueUnDo\.MergeInterval') | The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](../ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. Default value is 500ms\. | diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md new file mode 100644 index 0000000..4c347db --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md @@ -0,0 +1,25 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\) Method + +Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + +```csharp +bool DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); +``` +#### Parameters + + + +`other` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The other [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance the current one should try to merge with\. + + + +`mergedCommand` [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +The resulting merged [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') instance if the operation was successful\. + +Implements [TryMerge\(IUnDo, IUnDo\)](../IMergeableUnDo/TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md new file mode 100644 index 0000000..6ebe701 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.DefaultUnDo\.IUnDo\.Description Property + +Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + +```csharp +object? DefaultUnDo.IUnDo.Description { get; } +``` + +Implements [Description](../IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Do().md b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Do().md new file mode 100644 index 0000000..b5bb967 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Do().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.DefaultUnDo\.IUnDo\.Do\(\) Method + +Does an action\. + +```csharp +void DefaultUnDo.IUnDo.Do(); +``` + +Implements [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Undo().md b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Undo().md new file mode 100644 index 0000000..2b7605a --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Undo().md @@ -0,0 +1,12 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\) Method + +Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. + +```csharp +void DefaultUnDo.IUnDo.Undo(); +``` + +Implements [Undo\(\)](../IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionAction.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionAction.md new file mode 100644 index 0000000..01c97dc --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionAction.md @@ -0,0 +1,13 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.MergeDescriptionAction Property + +The [MergeDescriptionHandler\(object, T, object, T\)](MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)') used to merge description between two [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') instance\. + +```csharp +public static DefaultUnDo.ValueUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } +``` + +#### Property Value +[DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler<](MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)')[T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T')[>](MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md new file mode 100644 index 0000000..c9ea490 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md @@ -0,0 +1,44 @@ +#### [DefaultUnDo](../../../index.md 'index') +### [DefaultUnDo](../../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\) Delegate + +Represents a method that will be called when merging two [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\') instances to get the resulting description\. + +```csharp +public delegate object ValueUnDo.MergeDescriptionHandler(object? oldDescription, T oldValue, object? newDescription, T newValue); +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`oldDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the previous [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\') merged\. + + + +`oldValue` [T](DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md#DefaultUnDo.ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).T 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)\.T') + +The old value used when undoing the resulting merged [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\')\. + + + +`newDescription` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of the new [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\') merged\. + + + +`newValue` [T](DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md#DefaultUnDo.ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).T 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)\.T') + +The new value used when redoing the resulting merged [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\')\. + +#### Returns +[System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') +The new description that will be using for the resulting merged [ValueUnDo<T>](../index.md 'DefaultUnDo\.ValueUnDo\')\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeInterval.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeInterval.md new file mode 100644 index 0000000..c5a2518 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/MergeInterval.md @@ -0,0 +1,14 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\\.MergeInterval Property + +The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. +If not set, [MergeInterval](../ValueUnDo/MergeInterval.md 'DefaultUnDo\.ValueUnDo\.MergeInterval') will be used\. + +```csharp +public static System.Nullable MergeInterval { get; set; } +``` + +#### Property Value +[System\.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1')[System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System\.Nullable\`1') \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md new file mode 100644 index 0000000..1eb0bdc --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md @@ -0,0 +1,83 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\') + +## ValueUnDo\ Constructors + +| Overloads | | +| :--- | :--- | +| [ValueUnDo\(object, Action<T>, T, T\)](DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(object, System\.Action\, T, T\)') | Initialises an instance of [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\')\. | +| [ValueUnDo\(Action<T>, T, T\)](DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(System\.Action\, T, T\)') | Initialises an instance of [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\')\. | + + + +## ValueUnDo\(object, Action\, T, T\) Constructor + +Initialises an instance of [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\')\. + +```csharp +public ValueUnDo(object? description, System.Action setter, T newValue, T oldValue); +``` +#### Parameters + + + +`description` [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') + +The description of this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + + + +`setter` [System\.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1')[T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1') + +The action called to set the value\. + + + +`newValue` [T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T') + +The new value\. + + + +`oldValue` [T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T') + +The old value\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[setter](index.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T).setter 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(object, System\.Action\, T, T\)\.setter') is null\. + + + +## ValueUnDo\(Action\, T, T\) Constructor + +Initialises an instance of [ValueUnDo<T>](index.md 'DefaultUnDo\.ValueUnDo\')\. + +```csharp +public ValueUnDo(System.Action setter, T newValue, T oldValue); +``` +#### Parameters + + + +`setter` [System\.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1')[T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System\.Action\`1') + +The action called to set the value\. + + + +`newValue` [T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T') + +The new value\. + + + +`oldValue` [T](index.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo\.ValueUnDo\\.T') + +The old value\. + +#### Exceptions + +[System\.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System\.ArgumentNullException') +[setter](index.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T).setter 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(System\.Action\, T, T\)\.setter') is null\. \ No newline at end of file diff --git a/documentation/api/DefaultUnDo/ValueUnDo_T_/index.md b/documentation/api/DefaultUnDo/ValueUnDo_T_/index.md new file mode 100644 index 0000000..92f2384 --- /dev/null +++ b/documentation/api/DefaultUnDo/ValueUnDo_T_/index.md @@ -0,0 +1,38 @@ +#### [DefaultUnDo](../../index.md 'index') +### [DefaultUnDo](../../index.md#DefaultUnDo 'DefaultUnDo') + +## ValueUnDo\ Class + +Provides an implementation of the [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for setting value\. + +```csharp +public sealed class ValueUnDo : DefaultUnDo.IMergeableUnDo, DefaultUnDo.IUnDo +``` +#### Type parameters + + + +`T` + +The type of value\. + +Inheritance [System\.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System\.Object') 🡒 ValueUnDo + +Implements [IMergeableUnDo](../IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo'), [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') + +| Constructors | | +| :--- | :--- | +| [ValueUnDo\(object, Action<T>, T, T\)](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(object, System\.Action\, T, T\)') | Initialises an instance of [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. | +| [ValueUnDo\(Action<T>, T, T\)](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(System\.Action\, T, T\)') | Initialises an instance of [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. | + +| Properties | | +| :--- | :--- | +| [MergeDescriptionAction](MergeDescriptionAction.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionAction') | The [MergeDescriptionHandler\(object, T, object, T\)](MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)') used to merge description between two [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instance\. | +| [MergeInterval](MergeInterval.md 'DefaultUnDo\.ValueUnDo\\.MergeInterval') | The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. If not set, [MergeInterval](../ValueUnDo/MergeInterval.md 'DefaultUnDo\.ValueUnDo\.MergeInterval') will be used\. | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\)](DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)') | Merges the current instance with the specified [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo')\. | +| [DefaultUnDo\.IUnDo\.Description](DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Description') | Gets a description of what this [IUnDo](../IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. | +| [DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)') | Does an action\. | +| [DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)') | Does the opposite of the [Do\(\)](../IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. | diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md b/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index 7b4f542..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') - -## DictionaryUnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md b/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index 1207e42..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') - -## DictionaryUnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md b/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index 8a99be9..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') - -## DictionaryUnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md b/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md deleted file mode 100644 index 76bb56b..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') - -## DictionaryUnDo(IDictionary, TKey, TValue, bool) Constructor - -Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). - -```csharp -public DictionaryUnDo(System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); -``` -#### Parameters - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo.DictionaryUnDo.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo.DictionaryUnDo.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') on which to perform operation. - - - -`key` [TKey](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo.DictionaryUnDo.TKey') - -The key of the operation. - - - -`value` [TValue](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo.DictionaryUnDo.TValue') - -The value of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is [System.Collections.Generic.IDictionary<>.Add(@0,@1)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System.Collections.Generic.IDictionary`2.Add(`0,`1)'), false for [System.Collections.Generic.IDictionary<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System.Collections.Generic.IDictionary`2.Remove(`0)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).source 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(System.Collections.Generic.IDictionary, TKey, TValue, bool).source') or [key](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).key 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(System.Collections.Generic.IDictionary, TKey, TValue, bool).key') is null. \ No newline at end of file diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md b/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md deleted file mode 100644 index 131647d..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md +++ /dev/null @@ -1,46 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') - -## DictionaryUnDo(object, IDictionary, TKey, TValue, bool) Constructor - -Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). - -```csharp -public DictionaryUnDo(object? description, System.Collections.Generic.IDictionary source, TKey key, TValue value, bool isAdd); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo.DictionaryUnDo.TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo.DictionaryUnDo.TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') on which to perform operation. - - - -`key` [TKey](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TKey 'DefaultUnDo.DictionaryUnDo.TKey') - -The key of the operation. - - - -`value` [TValue](DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.TValue 'DefaultUnDo.DictionaryUnDo.TValue') - -The value of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is [System.Collections.Generic.IDictionary<>.Add(@0,@1)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System.Collections.Generic.IDictionary`2.Add(`0,`1)'), false for [System.Collections.Generic.IDictionary<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System.Collections.Generic.IDictionary`2.Remove(`0)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).source 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(object, System.Collections.Generic.IDictionary, TKey, TValue, bool).source') or [key](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool).key 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(object, System.Collections.Generic.IDictionary, TKey, TValue, bool).key') is null. \ No newline at end of file diff --git a/documentation/api/DictionaryUnDo_TKey,TValue_.md b/documentation/api/DictionaryUnDo_TKey,TValue_.md deleted file mode 100644 index ba1f538..0000000 --- a/documentation/api/DictionaryUnDo_TKey,TValue_.md +++ /dev/null @@ -1,39 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## DictionaryUnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') operation. - -```csharp -public sealed class DictionaryUnDo : -DefaultUnDo.IUnDo -``` -#### Type parameters - - - -`TKey` - -Type of the keys. - - - -`TValue` - -Type of the values. - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 DictionaryUnDo - -Implements [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [DictionaryUnDo(object, IDictionary<TKey,TValue>, TKey, TValue, bool)](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,IDictionary_TKey,TValue_,TKey,TValue,bool).md 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(object, System.Collections.Generic.IDictionary, TKey, TValue, bool)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). | -| [DictionaryUnDo(IDictionary<TKey,TValue>, TKey, TValue, bool)](DictionaryUnDo_TKey,TValue_.DictionaryUnDo(IDictionary_TKey,TValue_,TKey,TValue,bool).md 'DefaultUnDo.DictionaryUnDo.DictionaryUnDo(System.Collections.Generic.IDictionary, TKey, TValue, bool)') | Initialise an instance of [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo'). | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IUnDo.Description](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](DictionaryUnDo_TKey,TValue_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.DictionaryUnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md b/documentation/api/GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md deleted file mode 100644 index d1e4842..0000000 --- a/documentation/api/GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md +++ /dev/null @@ -1,25 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) Method - -Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -```csharp -bool DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); -``` -#### Parameters - - - -`other` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The other [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance the current one should try to merge with. - - - -`mergedCommand` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The resulting merged [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance if the operation was successful. - -Implements [TryMerge(IUnDo, IUnDo)](IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)') \ No newline at end of file diff --git a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Description.md b/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index 8196bc1..0000000 --- a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Do().md b/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index ed365f4..0000000 --- a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Undo().md b/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index 16a66df..0000000 --- a/documentation/api/GroupUnDo.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/GroupUnDo.GroupUnDo(IUnDo[]).md b/documentation/api/GroupUnDo.GroupUnDo(IUnDo[]).md deleted file mode 100644 index d53302d..0000000 --- a/documentation/api/GroupUnDo.GroupUnDo(IUnDo[]).md +++ /dev/null @@ -1,25 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo(IUnDo[]) Constructor - -Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). - -```csharp -public GroupUnDo(params DefaultUnDo.IUnDo[] commands); -``` -#### Parameters - - - -`commands` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - -The sequence of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') contained by the instance. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[commands](GroupUnDo.GroupUnDo(IUnDo[]).md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands 'DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands') is null. - -[System.ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentException 'System.ArgumentException') -[commands](GroupUnDo.GroupUnDo(IUnDo[]).md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands 'DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]).commands') contains null elements. \ No newline at end of file diff --git a/documentation/api/GroupUnDo.GroupUnDo(object,IUnDo[]).md b/documentation/api/GroupUnDo.GroupUnDo(object,IUnDo[]).md deleted file mode 100644 index 3109d3e..0000000 --- a/documentation/api/GroupUnDo.GroupUnDo(object,IUnDo[]).md +++ /dev/null @@ -1,31 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo(object, IUnDo[]) Constructor - -Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). - -```csharp -public GroupUnDo(object? description, params DefaultUnDo.IUnDo[] commands); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`commands` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - -The sequence of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') contained by the instance. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[commands](GroupUnDo.GroupUnDo(object,IUnDo[]).md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]).commands 'DefaultUnDo.GroupUnDo.GroupUnDo(object, DefaultUnDo.IUnDo[]).commands') is null. - -[System.ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentException 'System.ArgumentException') -[commands](GroupUnDo.GroupUnDo(object,IUnDo[]).md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]).commands 'DefaultUnDo.GroupUnDo.GroupUnDo(object, DefaultUnDo.IUnDo[]).commands') contains null elements. \ No newline at end of file diff --git a/documentation/api/GroupUnDo.MergeDescriptionAction.md b/documentation/api/GroupUnDo.MergeDescriptionAction.md deleted file mode 100644 index 0b41b12..0000000 --- a/documentation/api/GroupUnDo.MergeDescriptionAction.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.MergeDescriptionAction Property - -The [MergeDescriptionHandler(object, object, object)](GroupUnDo.MergeDescriptionHandler(object,object,object).md 'DefaultUnDo.GroupUnDo.MergeDescriptionHandler(object, object, object)') used to merge description between a [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and a [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') instances. - -```csharp -public static DefaultUnDo.GroupUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } -``` - -#### Property Value -[MergeDescriptionHandler(object, object, object)](GroupUnDo.MergeDescriptionHandler(object,object,object).md 'DefaultUnDo.GroupUnDo.MergeDescriptionHandler(object, object, object)') \ No newline at end of file diff --git a/documentation/api/GroupUnDo.MergeDescriptionHandler(object,object,object).md b/documentation/api/GroupUnDo.MergeDescriptionHandler(object,object,object).md deleted file mode 100644 index 895ec31..0000000 --- a/documentation/api/GroupUnDo.MergeDescriptionHandler(object,object,object).md +++ /dev/null @@ -1,33 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.MergeDescriptionHandler(object, object, object) Delegate - -Represents a method that will be called when merging a [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and a [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') instances to get the resulting description. - -```csharp -public delegate object GroupUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription, object? mergedDescription); -``` -#### Parameters - - - -`oldDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the previous [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') merged. - - - -`newDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the new [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') merged. - - - -`mergedDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the new resulting [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') merged. - -#### Returns -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') -The final description to use. \ No newline at end of file diff --git a/documentation/api/GroupUnDo.TryGetSingle_T_(T).md b/documentation/api/GroupUnDo.TryGetSingle_T_(T).md deleted file mode 100644 index 92e1661..0000000 --- a/documentation/api/GroupUnDo.TryGetSingle_T_(T).md +++ /dev/null @@ -1,28 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') - -## GroupUnDo.TryGetSingle(T) Method - -Gets the single [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T') of this instance. - -```csharp -public bool TryGetSingle(out T command) - where T : DefaultUnDo.IUnDo; -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`command` [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T') - -When this method returns, the single [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T') of this instance, if it was its only command; otherwise, the default value for the type [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T'). -This parameter is passed uninitialized. - -#### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -true if the current instance contains exactly one [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T'); otherwise false. \ No newline at end of file diff --git a/documentation/api/GroupUnDo.md b/documentation/api/GroupUnDo.md deleted file mode 100644 index 822679f..0000000 --- a/documentation/api/GroupUnDo.md +++ /dev/null @@ -1,36 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## GroupUnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for a group of operations. - -```csharp -public sealed class GroupUnDo : -DefaultUnDo.IMergeableUnDo, -DefaultUnDo.IUnDo -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 GroupUnDo - -Implements [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo'), [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [GroupUnDo(IUnDo[])](GroupUnDo.GroupUnDo(IUnDo[]).md 'DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[])') | Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). | -| [GroupUnDo(object, IUnDo[])](GroupUnDo.GroupUnDo(object,IUnDo[]).md 'DefaultUnDo.GroupUnDo.GroupUnDo(object, DefaultUnDo.IUnDo[])') | Initialise an instance of [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo'). | - -| Properties | | -| :--- | :--- | -| [MergeDescriptionAction](GroupUnDo.MergeDescriptionAction.md 'DefaultUnDo.GroupUnDo.MergeDescriptionAction') | The [MergeDescriptionHandler(object, object, object)](GroupUnDo.MergeDescriptionHandler(object,object,object).md 'DefaultUnDo.GroupUnDo.MergeDescriptionHandler(object, object, object)') used to merge description between a [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and a [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') instances. | - -| Methods | | -| :--- | :--- | -| [TryGetSingle<T>(T)](GroupUnDo.TryGetSingle_T_(T).md 'DefaultUnDo.GroupUnDo.TryGetSingle(T)') | Gets the single [T](GroupUnDo.TryGetSingle_T_(T).md#DefaultUnDo.GroupUnDo.TryGetSingle_T_(T).T 'DefaultUnDo.GroupUnDo.TryGetSingle(T).T') of this instance. | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo)](GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)') | Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). | -| [DefaultUnDo.IUnDo.Description](GroupUnDo.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](GroupUnDo.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](GroupUnDo.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.GroupUnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md deleted file mode 100644 index 1a7e8ee..0000000 --- a/documentation/api/ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md +++ /dev/null @@ -1,45 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ICollectionExtension](ICollectionExtension.md 'DefaultUnDo.ICollectionExtension') - -## ICollectionExtension.AsUnDo(this ICollection, IUnDoManager, Func) Method - -Wraps an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') to an UnDo collection linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static System.Collections.Generic.ICollection AsUnDo(this System.Collections.Generic.ICollection source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). -#### Parameters - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtension.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Returns -[System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtension.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') -A wrapped [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtension.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func).source') or [manager](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ICollectionExtension.AsUnDo_T_(thisSystem.Collections.Generic.ICollection_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func).manager') is null. \ No newline at end of file diff --git a/documentation/api/ICollectionExtension.md b/documentation/api/ICollectionExtension.md deleted file mode 100644 index 24c52bb..0000000 --- a/documentation/api/ICollectionExtension.md +++ /dev/null @@ -1,16 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## ICollectionExtension Class - -Provides a method to wrap an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') to an UnDo collection linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static class ICollectionExtension -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ICollectionExtension - -| Methods | | -| :--- | :--- | -| [AsUnDo<T>(this ICollection<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](ICollectionExtension.AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.ICollectionExtension.AsUnDo(this System.Collections.Generic.ICollection, DefaultUnDo.IUnDoManager, System.Func)') | Wraps an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') to an UnDo collection linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | diff --git a/documentation/api/IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md deleted file mode 100644 index 253f207..0000000 --- a/documentation/api/IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md +++ /dev/null @@ -1,51 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IDictionaryExtension](IDictionaryExtension.md 'DefaultUnDo.IDictionaryExtension') - -## IDictionaryExtension.AsUnDo(this IDictionary, IUnDoManager, Func) Method - -Wraps an [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') to an UnDo dictionary linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static System.Collections.Generic.IDictionary AsUnDo(this System.Collections.Generic.IDictionary source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); -``` -#### Type parameters - - - -`TKey` - -The type of keys. - - - -`TValue` - -The type of values. -#### Parameters - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TKey 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TValue 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2'). - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Returns -[System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TKey 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).TValue 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') -A wrapped [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).source') or [manager](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IDictionaryExtension.AsUnDo_TKey,TValue_(thisSystem.Collections.Generic.IDictionary_TKey,TValue_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func).manager') is null. \ No newline at end of file diff --git a/documentation/api/IDictionaryExtension.md b/documentation/api/IDictionaryExtension.md deleted file mode 100644 index 7c35e21..0000000 --- a/documentation/api/IDictionaryExtension.md +++ /dev/null @@ -1,16 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IDictionaryExtension Class - -Provides a method to wrap an [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') to an UnDo dictionary linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static class IDictionaryExtension -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 IDictionaryExtension - -| Methods | | -| :--- | :--- | -| [AsUnDo<TKey,TValue>(this IDictionary<TKey,TValue>, IUnDoManager, Func<UnDoCollectionOperation,object>)](IDictionaryExtension.AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.IDictionaryExtension.AsUnDo(this System.Collections.Generic.IDictionary, DefaultUnDo.IUnDoManager, System.Func)') | Wraps an [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') to an UnDo dictionary linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | diff --git a/documentation/api/IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md deleted file mode 100644 index 98ff604..0000000 --- a/documentation/api/IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md +++ /dev/null @@ -1,45 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IListExtension](IListExtension.md 'DefaultUnDo.IListExtension') - -## IListExtension.AsUnDo(this IList, IUnDoManager, Func) Method - -Wraps an [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') to an UnDo list linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static System.Collections.Generic.IList AsUnDo(this System.Collections.Generic.IList source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). -#### Parameters - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtension.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Returns -[System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtension.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') -A wrapped [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtension.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func).source') or [manager](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.IListExtension.AsUnDo_T_(thisSystem.Collections.Generic.IList_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func).manager') is null. \ No newline at end of file diff --git a/documentation/api/IListExtension.Move_T_(thisIList_T_,int,int).md b/documentation/api/IListExtension.Move_T_(thisIList_T_,int,int).md deleted file mode 100644 index eccfbaf..0000000 --- a/documentation/api/IListExtension.Move_T_(thisIList_T_,int,int).md +++ /dev/null @@ -1,38 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IListExtension](IListExtension.md 'DefaultUnDo.IListExtension') - -## IListExtension.Move(this IList, int, int) Method - -Moves the item at the specified index to a new location in the collection. -If [source](IListExtension.Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtension.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).source 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int).source') is an UnDo list and its inner source an [System.Collections.ObjectModel.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System.Collections.ObjectModel.ObservableCollection`1'), it will use the [System.Collections.ObjectModel.ObservableCollection<>.Move(System.Int32,System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System.Collections.ObjectModel.ObservableCollection`1.Move(System.Int32,System.Int32)') method; -else it will do an [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)') and [System.Collections.Generic.IList<>.Insert(System.Int32,@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System.Collections.Generic.IList`1.Insert(System.Int32,`0)'). - -```csharp -public static void Move(this System.Collections.Generic.IList source, int oldIndex, int newIndex); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). -#### Parameters - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IListExtension.Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtension.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).T 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') on which to perform the move. - - - -`oldIndex` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The zero-based index specifying the location of the item to be moved. - - - -`newIndex` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The zero-based index specifying the new location of the item. \ No newline at end of file diff --git a/documentation/api/IListExtension.md b/documentation/api/IListExtension.md deleted file mode 100644 index fae6e87..0000000 --- a/documentation/api/IListExtension.md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IListExtension Class - -Provides a method to wrap an [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') to an UnDo list linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static class IListExtension -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 IListExtension - -| Methods | | -| :--- | :--- | -| [AsUnDo<T>(this IList<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](IListExtension.AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.IListExtension.AsUnDo(this System.Collections.Generic.IList, DefaultUnDo.IUnDoManager, System.Func)') | Wraps an [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') to an UnDo list linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | -| [Move<T>(this IList<T>, int, int)](IListExtension.Move_T_(thisIList_T_,int,int).md 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int)') | Moves the item at the specified index to a new location in the collection.
If [source](IListExtension.Move_T_(thisIList_T_,int,int).md#DefaultUnDo.IListExtension.Move_T_(thisSystem.Collections.Generic.IList_T_,int,int).source 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int).source') is an UnDo list and its inner source an [System.Collections.ObjectModel.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System.Collections.ObjectModel.ObservableCollection`1'), it will use the [System.Collections.ObjectModel.ObservableCollection<>.Move(System.Int32,System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System.Collections.ObjectModel.ObservableCollection`1.Move(System.Int32,System.Int32)') method;
else it will do an [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)') and [System.Collections.Generic.IList<>.Insert(System.Int32,@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System.Collections.Generic.IList`1.Insert(System.Int32,`0)'). | diff --git a/documentation/api/IMergeableUnDo.TryMerge(IUnDo,IUnDo).md b/documentation/api/IMergeableUnDo.TryMerge(IUnDo,IUnDo).md deleted file mode 100644 index 74b6e17..0000000 --- a/documentation/api/IMergeableUnDo.TryMerge(IUnDo,IUnDo).md +++ /dev/null @@ -1,27 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') - -## IMergeableUnDo.TryMerge(IUnDo, IUnDo) Method - -Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -```csharp -bool TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); -``` -#### Parameters - - - -`other` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The other [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance the current one should try to merge with. - - - -`mergedCommand` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The resulting merged [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance if the operation was successful. - -#### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -true if the merge was successful; otherwise false. \ No newline at end of file diff --git a/documentation/api/IMergeableUnDo.md b/documentation/api/IMergeableUnDo.md deleted file mode 100644 index 27a6eff..0000000 --- a/documentation/api/IMergeableUnDo.md +++ /dev/null @@ -1,21 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IMergeableUnDo Interface - -Provides a method to try to merge two [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instances into a single one. - -```csharp -public interface IMergeableUnDo : -DefaultUnDo.IUnDo -``` - -Derived -↳ [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') -↳ [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -Implements [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Methods | | -| :--- | :--- | -| [TryMerge(IUnDo, IUnDo)](IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)') | Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). | diff --git a/documentation/api/ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md b/documentation/api/ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md deleted file mode 100644 index 2e55ef9..0000000 --- a/documentation/api/ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md +++ /dev/null @@ -1,45 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ISetExtension](ISetExtension.md 'DefaultUnDo.ISetExtension') - -## ISetExtension.AsUnDo(this ISet, IUnDoManager, Func) Method - -Wraps an [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') to an UnDo set linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static System.Collections.Generic.ISet AsUnDo(this System.Collections.Generic.ISet source, DefaultUnDo.IUnDoManager manager, System.Func? descriptionFactory=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1'). -#### Parameters - - - -`source` [System.Collections.Generic.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1')[T](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtension.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') - -The [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1'). - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Returns -[System.Collections.Generic.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1')[T](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtension.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).T 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') -A wrapped [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtension.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).source 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func).source') or [manager](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md#DefaultUnDo.ISetExtension.AsUnDo_T_(thisSystem.Collections.Generic.ISet_T_,DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoCollectionOperation,object_).manager 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func).manager') is null. \ No newline at end of file diff --git a/documentation/api/ISetExtension.md b/documentation/api/ISetExtension.md deleted file mode 100644 index 9893593..0000000 --- a/documentation/api/ISetExtension.md +++ /dev/null @@ -1,16 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## ISetExtension Class - -Provides a method to wrap an [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') to an UnDo set linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public static class ISetExtension -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ISetExtension - -| Methods | | -| :--- | :--- | -| [AsUnDo<T>(this ISet<T>, IUnDoManager, Func<UnDoCollectionOperation,object>)](ISetExtension.AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo.ISetExtension.AsUnDo(this System.Collections.Generic.ISet, DefaultUnDo.IUnDoManager, System.Func)') | Wraps an [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') to an UnDo set linked to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | diff --git a/documentation/api/IUnDo.Description.md b/documentation/api/IUnDo.Description.md deleted file mode 100644 index b2d3a21..0000000 --- a/documentation/api/IUnDo.Description.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -## IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? Description { get; } -``` - -#### Property Value -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') \ No newline at end of file diff --git a/documentation/api/IUnDo.Do().md b/documentation/api/IUnDo.Do().md deleted file mode 100644 index 599bc49..0000000 --- a/documentation/api/IUnDo.Do().md +++ /dev/null @@ -1,10 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -## IUnDo.Do() Method - -Does an action. - -```csharp -void Do(); -``` \ No newline at end of file diff --git a/documentation/api/IUnDo.Undo().md b/documentation/api/IUnDo.Undo().md deleted file mode 100644 index c38230f..0000000 --- a/documentation/api/IUnDo.Undo().md +++ /dev/null @@ -1,10 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -## IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void Undo(); -``` \ No newline at end of file diff --git a/documentation/api/IUnDo.md b/documentation/api/IUnDo.md deleted file mode 100644 index 5f14114..0000000 --- a/documentation/api/IUnDo.md +++ /dev/null @@ -1,28 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IUnDo Interface - -Provides methods to execute an action and remove its effect. - -```csharp -public interface IUnDo -``` - -Derived -↳ [CollectionUnDo<T>](CollectionUnDo_T_.md 'DefaultUnDo.CollectionUnDo') -↳ [DictionaryUnDo<TKey,TValue>](DictionaryUnDo_TKey,TValue_.md 'DefaultUnDo.DictionaryUnDo') -↳ [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') -↳ [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo') -↳ [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') -↳ [UnDo](UnDo.md 'DefaultUnDo.UnDo') -↳ [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -| Properties | | -| :--- | :--- | -| [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | - -| Methods | | -| :--- | :--- | -| [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') | Does an action. | -| [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/IUnDoManager.BeginTransaction(object).md b/documentation/api/IUnDoManager.BeginTransaction(object).md deleted file mode 100644 index 509fc41..0000000 --- a/documentation/api/IUnDoManager.BeginTransaction(object).md +++ /dev/null @@ -1,22 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.BeginTransaction(object) Method - -Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group. -If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). - -```csharp -DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the group of operations. - -#### Returns -[IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') -An [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to commit or rollback the transaction of operations. \ No newline at end of file diff --git a/documentation/api/IUnDoManager.CanRedo.md b/documentation/api/IUnDoManager.CanRedo.md deleted file mode 100644 index d72f26b..0000000 --- a/documentation/api/IUnDoManager.CanRedo.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.CanRedo Property - -Returns a boolean to express if the method [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') can be executed. - -```csharp -bool CanRedo { get; } -``` - -#### Property Value -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/documentation/api/IUnDoManager.CanUndo.md b/documentation/api/IUnDoManager.CanUndo.md deleted file mode 100644 index f9b511b..0000000 --- a/documentation/api/IUnDoManager.CanUndo.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.CanUndo Property - -Returns a boolean to express if the method [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') can be executed. - -```csharp -bool CanUndo { get; } -``` - -#### Property Value -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/documentation/api/IUnDoManager.Clear().md b/documentation/api/IUnDoManager.Clear().md deleted file mode 100644 index 7b4553d..0000000 --- a/documentation/api/IUnDoManager.Clear().md +++ /dev/null @@ -1,10 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.Clear() Method - -Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -void Clear(); -``` \ No newline at end of file diff --git a/documentation/api/IUnDoManager.Do(IUnDo).md b/documentation/api/IUnDoManager.Do(IUnDo).md deleted file mode 100644 index 722a673..0000000 --- a/documentation/api/IUnDoManager.Do(IUnDo).md +++ /dev/null @@ -1,22 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.Do(IUnDo) Method - -Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. - -```csharp -void Do(DefaultUnDo.IUnDo command); -``` -#### Parameters - - - -`command` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') to execute. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[command](IUnDoManager.Do(IUnDo).md#DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo).command 'DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo).command') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManager.Redo().md b/documentation/api/IUnDoManager.Redo().md deleted file mode 100644 index 825bf8e..0000000 --- a/documentation/api/IUnDoManager.Redo().md +++ /dev/null @@ -1,18 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.Redo() Method - -Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - -```csharp -void Redo(); -``` - -#### Exceptions - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Cannot perform [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') while a group operation is going on. - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -There is no action to redo. \ No newline at end of file diff --git a/documentation/api/IUnDoManager.RedoDescriptions.md b/documentation/api/IUnDoManager.RedoDescriptions.md deleted file mode 100644 index 453d197..0000000 --- a/documentation/api/IUnDoManager.RedoDescriptions.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.RedoDescriptions Property - -Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. - -```csharp -System.Collections.Generic.IEnumerable RedoDescriptions { get; } -``` - -#### Property Value -[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') \ No newline at end of file diff --git a/documentation/api/IUnDoManager.Undo().md b/documentation/api/IUnDoManager.Undo().md deleted file mode 100644 index 9e2b1b3..0000000 --- a/documentation/api/IUnDoManager.Undo().md +++ /dev/null @@ -1,18 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.Undo() Method - -Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - -```csharp -void Undo(); -``` - -#### Exceptions - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Cannot perform [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') while a group operation is going on. - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -There is no action to undo. \ No newline at end of file diff --git a/documentation/api/IUnDoManager.UndoDescriptions.md b/documentation/api/IUnDoManager.UndoDescriptions.md deleted file mode 100644 index cff9f6e..0000000 --- a/documentation/api/IUnDoManager.UndoDescriptions.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.UndoDescriptions Property - -Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. - -```csharp -System.Collections.Generic.IEnumerable UndoDescriptions { get; } -``` - -#### Property Value -[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') \ No newline at end of file diff --git a/documentation/api/IUnDoManager.Version.md b/documentation/api/IUnDoManager.Version.md deleted file mode 100644 index 6abbe0a..0000000 --- a/documentation/api/IUnDoManager.Version.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -## IUnDoManager.Version Property - -Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - -```csharp -int Version { get; } -``` - -#### Property Value -[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/documentation/api/IUnDoManager.md b/documentation/api/IUnDoManager.md deleted file mode 100644 index 80a6e87..0000000 --- a/documentation/api/IUnDoManager.md +++ /dev/null @@ -1,32 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IUnDoManager Interface - -Provides properties and methods of the command pattern to execute operations and return to a previous state by undoing them. - -```csharp -public interface IUnDoManager : -System.ComponentModel.INotifyPropertyChanged -``` - -Derived -↳ [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -Implements [System.ComponentModel.INotifyPropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged 'System.ComponentModel.INotifyPropertyChanged') - -| Properties | | -| :--- | :--- | -| [CanRedo](IUnDoManager.CanRedo.md 'DefaultUnDo.IUnDoManager.CanRedo') | Returns a boolean to express if the method [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') can be executed. | -| [CanUndo](IUnDoManager.CanUndo.md 'DefaultUnDo.IUnDoManager.CanUndo') | Returns a boolean to express if the method [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') can be executed. | -| [RedoDescriptions](IUnDoManager.RedoDescriptions.md 'DefaultUnDo.IUnDoManager.RedoDescriptions') | Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. | -| [UndoDescriptions](IUnDoManager.UndoDescriptions.md 'DefaultUnDo.IUnDoManager.UndoDescriptions') | Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. | -| [Version](IUnDoManager.Version.md 'DefaultUnDo.IUnDoManager.Version') | Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). | - -| Methods | | -| :--- | :--- | -| [BeginTransaction(object)](IUnDoManager.BeginTransaction(object).md 'DefaultUnDo.IUnDoManager.BeginTransaction(object)') | Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group.
If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). | -| [Clear()](IUnDoManager.Clear().md 'DefaultUnDo.IUnDoManager.Clear()') | Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | -| [Do(IUnDo)](IUnDoManager.Do(IUnDo).md 'DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo)') | Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. | -| [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') | Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. | -| [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') | Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. | diff --git a/documentation/api/IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md b/documentation/api/IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md deleted file mode 100644 index 727fa0b..0000000 --- a/documentation/api/IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.Do(this IUnDoManager, Action, Action, object) Method - -Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified doAction and undoAction. - -```csharp -public static void Do(this DefaultUnDo.IUnDoManager manager, System.Action? doAction, System.Action? undoAction, object? description=null); -``` -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`doAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') performed by [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()'). - - - -`undoAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') performed by the [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()'). - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md#DefaultUnDo.IUnDoManagerExtension.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object).manager 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, System.Action, object).manager') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md b/documentation/api/IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md deleted file mode 100644 index 4dc5701..0000000 --- a/documentation/api/IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md +++ /dev/null @@ -1,59 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoAdd(this IUnDoManager, IDictionary, TKey, TValue, object) Method - -Adds a value to a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, TValue value, object? description=null); -``` -#### Type parameters - - - -`TKey` - -The type of the key. - - - -`TValue` - -The type of the value. -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2'). - - - -`key` [TKey](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TKey') - -The key to add. - - - -`value` [TValue](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TValue') - -The value to add. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).manager'), [source](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).source 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).source') or [key](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).key 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).key') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md b/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md deleted file mode 100644 index 1c46ce8..0000000 --- a/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md +++ /dev/null @@ -1,47 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoAdd(this IUnDoManager, ICollection, T, object) Method - -Adds a value to a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, T item, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - - - -`item` [T](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).T') - -The item to add. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).manager') or [source](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md b/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md deleted file mode 100644 index 3e5b4b2..0000000 --- a/documentation/api/IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md +++ /dev/null @@ -1,51 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoAdd(this IUnDoManager, ISet, T, object) Method - -Adds an item from a [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static bool DoAdd(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ISet source, T item, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.ISet<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1')[T](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') - -The [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1'). - - - -`item` [T](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).T') - -The item to add. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -true if the command has been created, false if not because [source](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).source') already contained [item](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).item 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).item'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).manager') or [source](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md b/documentation/api/IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md deleted file mode 100644 index 39f0765..0000000 --- a/documentation/api/IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md +++ /dev/null @@ -1,41 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoClear(this IUnDoManager, ICollection, object) Method - -Clears a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void DoClear(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtension.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).T 'DefaultUnDo.IUnDoManagerExtension.DoClear(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtension.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoClear(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, object).manager') or [source](IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md#DefaultUnDo.IUnDoManagerExtension.DoClear_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,object).source 'DefaultUnDo.IUnDoManagerExtension.DoClear(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md b/documentation/api/IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md deleted file mode 100644 index 55e2af1..0000000 --- a/documentation/api/IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md +++ /dev/null @@ -1,53 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoInsert(this IUnDoManager, IList, int, T, object) Method - -Inserts an item to a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void DoInsert(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, T item, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The zero-based index at which item should be inserted. - - - -`item` [T](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).T') - -The item to insert into the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).manager') or [source](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoInsert_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md b/documentation/api/IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md deleted file mode 100644 index fdf4302..0000000 --- a/documentation/api/IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md +++ /dev/null @@ -1,34 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoOnDo(this IUnDoManager, Action, object) Method - -Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no undo. - -```csharp -public static void DoOnDo(this DefaultUnDo.IUnDoManager manager, System.Action action, object? description=null); -``` -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`action` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') performed by [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()'). - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md#DefaultUnDo.IUnDoManagerExtension.DoOnDo(thisDefaultUnDo.IUnDoManager,System.Action,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoOnDo(this DefaultUnDo.IUnDoManager, System.Action, object).manager') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md b/documentation/api/IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md deleted file mode 100644 index cff7d63..0000000 --- a/documentation/api/IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md +++ /dev/null @@ -1,34 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoOnUndo(this IUnDoManager, Action, object) Method - -Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no do. - -```csharp -public static void DoOnUndo(this DefaultUnDo.IUnDoManager manager, System.Action action, object? description=null); -``` -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`action` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') performed by [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()'). - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md#DefaultUnDo.IUnDoManagerExtension.DoOnUndo(thisDefaultUnDo.IUnDoManager,System.Action,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoOnUndo(this DefaultUnDo.IUnDoManager, System.Action, object).manager') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md b/documentation/api/IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md deleted file mode 100644 index 6af2653..0000000 --- a/documentation/api/IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md +++ /dev/null @@ -1,47 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoRemoveAt(this IUnDoManager, IList, int, object) Method - -Removes an item from a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void DoRemoveAt(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).T 'DefaultUnDo.IUnDoManagerExtension.DoRemoveAt(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The zero-based index at which item should be removed. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoRemoveAt(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, object).manager') or [source](IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemoveAt_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,object).source 'DefaultUnDo.IUnDoManagerExtension.DoRemoveAt(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md b/documentation/api/IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md deleted file mode 100644 index cd64b9f..0000000 --- a/documentation/api/IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md +++ /dev/null @@ -1,57 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoRemove(this IUnDoManager, IDictionary, TKey, object) Method - -Removes the item with the specified key from a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static bool DoRemove(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, object? description=null); -``` -#### Type parameters - - - -`TKey` - -The type of the key. - - - -`TValue` - -The type of the value. -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TKey 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TValue 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2'). - - - -`key` [TKey](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).TKey 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).TKey') - -The key to remove. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -true if the command has been created, false if not because [source](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).source 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).source') did not contained [key](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).key 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).key'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).manager'), [source](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).source 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).source') or [key](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object).key 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object).key') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md b/documentation/api/IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md deleted file mode 100644 index 4b67325..0000000 --- a/documentation/api/IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md +++ /dev/null @@ -1,51 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.DoRemove(this IUnDoManager, ICollection, T, object) Method - -Removes an item from a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static bool DoRemove(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.ICollection source, T item, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.ICollection<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1')[T](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') - -The [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1'). - - - -`item` [T](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).T 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).T') - -The item to remove. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -true if the command has been created, false if not because [source](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).source') did not contained [item](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).item 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).item'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).manager') or [source](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md#DefaultUnDo.IUnDoManagerExtension.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object).source 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md b/documentation/api/IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md deleted file mode 100644 index 9603cc1..0000000 --- a/documentation/api/IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md +++ /dev/null @@ -1,59 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.Do(this IUnDoManager, IDictionary, TKey, TValue, object) Method - -Sets the element with the specified key on a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void Do(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IDictionary source, TKey key, TValue value, object? description=null); -``` -#### Type parameters - - - -`TKey` - -The type of the key. - - - -`TValue` - -The type of the value. -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IDictionary<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TKey](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TKey')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2')[TValue](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TValue')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') - -The [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2'). - - - -`key` [TKey](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TKey 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TKey') - -The key to set. - - - -`value` [TValue](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).TValue 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).TValue') - -The value to add. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).manager 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).manager'), [source](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).source 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).source') or [key](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md#DefaultUnDo.IUnDoManagerExtension.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object).key 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object).key') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md b/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md deleted file mode 100644 index c958ae7..0000000 --- a/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md +++ /dev/null @@ -1,53 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.Do(this IUnDoManager, Action, T, T, object) Method - -Sets a value as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void Do(this DefaultUnDo.IUnDoManager manager, System.Action setter, T newValue, T oldValue, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of the value. -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`setter` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[T](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') - -The [System.Action<>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') used to change the value. - - - -`newValue` [T](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object).T') - -The new value. - - - -`oldValue` [T](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).T 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object).T') - -The old value. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object).manager') or [setter](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object).setter 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object).setter') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md b/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md deleted file mode 100644 index 4b0a611..0000000 --- a/documentation/api/IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md +++ /dev/null @@ -1,53 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoManagerExtension](IUnDoManagerExtension.md 'DefaultUnDo.IUnDoManagerExtension') - -## IUnDoManagerExtension.Do(this IUnDoManager, IList, int, T, object) Method - -Sets the element at the specified index on a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -public static void Do(this DefaultUnDo.IUnDoManager manager, System.Collections.Generic.IList source, int index, T item, object? description=null); -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The zero-based index of the element to get or set. - - - -`item` [T](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).T 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).T') - -The new item. - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the operation. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).manager 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).manager') or [source](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md#DefaultUnDo.IUnDoManagerExtension.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object).source 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object).source') is null. \ No newline at end of file diff --git a/documentation/api/IUnDoManagerExtension.md b/documentation/api/IUnDoManagerExtension.md deleted file mode 100644 index f8ba7d2..0000000 --- a/documentation/api/IUnDoManagerExtension.md +++ /dev/null @@ -1,29 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IUnDoManagerExtension Class - -Provides methods to create [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and add them to an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - -```csharp -public static class IUnDoManagerExtension -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 IUnDoManagerExtension - -| Methods | | -| :--- | :--- | -| [Do(this IUnDoManager, Action, Action, object)](IUnDoManagerExtension.Do(thisIUnDoManager,Action,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, System.Action, object)') | Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified doAction and undoAction. | -| [Do<T>(this IUnDoManager, Action<T>, T, T, object)](IUnDoManagerExtension.Do_T_(thisIUnDoManager,Action_T_,T,T,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Action, T, T, object)') | Sets a value as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [Do<T>(this IUnDoManager, IList<T>, int, T, object)](IUnDoManagerExtension.Do_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object)') | Sets the element at the specified index on a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [Do<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object)](IUnDoManagerExtension.Do_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md 'DefaultUnDo.IUnDoManagerExtension.Do(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object)') | Sets the element with the specified key on a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoAdd<T>(this IUnDoManager, ICollection<T>, T, object)](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ICollection_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object)') | Adds a value to a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoAdd<T>(this IUnDoManager, ISet<T>, T, object)](IUnDoManagerExtension.DoAdd_T_(thisIUnDoManager,ISet_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ISet, T, object)') | Adds an item from a [System.Collections.Generic.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System.Collections.Generic.ISet`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoAdd<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object)](IUnDoManagerExtension.DoAdd_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,TValue,object).md 'DefaultUnDo.IUnDoManagerExtension.DoAdd(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, TValue, object)') | Adds a value to a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoClear<T>(this IUnDoManager, ICollection<T>, object)](IUnDoManagerExtension.DoClear_T_(thisIUnDoManager,ICollection_T_,object).md 'DefaultUnDo.IUnDoManagerExtension.DoClear(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, object)') | Clears a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoInsert<T>(this IUnDoManager, IList<T>, int, T, object)](IUnDoManagerExtension.DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoInsert(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, T, object)') | Inserts an item to a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoOnDo(this IUnDoManager, Action, object)](IUnDoManagerExtension.DoOnDo(thisIUnDoManager,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.DoOnDo(this DefaultUnDo.IUnDoManager, System.Action, object)') | Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no undo. | -| [DoOnUndo(this IUnDoManager, Action, object)](IUnDoManagerExtension.DoOnUndo(thisIUnDoManager,Action,object).md 'DefaultUnDo.IUnDoManagerExtension.DoOnUndo(this DefaultUnDo.IUnDoManager, System.Action, object)') | Does a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on the manager with the specified action with no do. | -| [DoRemove<T>(this IUnDoManager, ICollection<T>, T, object)](IUnDoManagerExtension.DoRemove_T_(thisIUnDoManager,ICollection_T_,T,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.ICollection, T, object)') | Removes an item from a [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoRemove<TKey,TValue>(this IUnDoManager, IDictionary<TKey,TValue>, TKey, object)](IUnDoManagerExtension.DoRemove_TKey,TValue_(thisIUnDoManager,IDictionary_TKey,TValue_,TKey,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemove(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IDictionary, TKey, object)') | Removes the item with the specified key from a [System.Collections.Generic.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System.Collections.Generic.IDictionary`2') as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [DoRemoveAt<T>(this IUnDoManager, IList<T>, int, object)](IUnDoManagerExtension.DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md 'DefaultUnDo.IUnDoManagerExtension.DoRemoveAt(this DefaultUnDo.IUnDoManager, System.Collections.Generic.IList, int, object)') | Removes an item from a [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') at the specified index as a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | diff --git a/documentation/api/IUnDoTransaction.Commit().md b/documentation/api/IUnDoTransaction.Commit().md deleted file mode 100644 index 608efc5..0000000 --- a/documentation/api/IUnDoTransaction.Commit().md +++ /dev/null @@ -1,21 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') - -## IUnDoTransaction.Commit() Method - -Groups all recorded operations in a single [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and add it to the history of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') instance this instance was created from. -If this method is not called before disposing current instance, all recorded operations will be undone. - -```csharp -void Commit(); -``` - -#### Exceptions - -[System.ObjectDisposedException](https://docs.microsoft.com/en-us/dotnet/api/System.ObjectDisposedException 'System.ObjectDisposedException') - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Current transaction has already been committed - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Current transaction is not the highest one on the stack \ No newline at end of file diff --git a/documentation/api/IUnDoTransaction.md b/documentation/api/IUnDoTransaction.md deleted file mode 100644 index 1567a05..0000000 --- a/documentation/api/IUnDoTransaction.md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## IUnDoTransaction Interface - -Represents a transaction to record multiple undo operations as a single operation in the history of a [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - -```csharp -public interface IUnDoTransaction : -System.IDisposable -``` - -Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable') - -| Methods | | -| :--- | :--- | -| [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') | Groups all recorded operations in a single [GroupUnDo](GroupUnDo.md 'DefaultUnDo.GroupUnDo') and add it to the history of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') instance this instance was created from.
If this method is not called before disposing current instance, all recorded operations will be undone. | diff --git a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Description.md b/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index 9a0e8e8..0000000 --- a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') - -## ListUnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Do().md b/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index 9cc06ca..0000000 --- a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') - -## ListUnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md b/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index f139bb0..0000000 --- a/documentation/api/ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') - -## ListUnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md b/documentation/api/ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md deleted file mode 100644 index c645640..0000000 --- a/documentation/api/ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') - -## ListUnDo(IList, int, T, bool) Constructor - -Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). - -```csharp -public ListUnDo(System.Collections.Generic.IList source, int index, T item, bool isAdd); -``` -#### Parameters - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo.ListUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') on which the operation is performed. - - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The index of the operation. - - - -`item` [T](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo.ListUnDo.T') - -The argument of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is an [System.Collections.Generic.IList<>.IndexOf(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.IndexOf#System_Collections_Generic_IList_1_IndexOf__0_ 'System.Collections.Generic.IList`1.IndexOf(`0)'), else false for a [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool).source 'DefaultUnDo.ListUnDo.ListUnDo(System.Collections.Generic.IList, int, T, bool).source') is null. \ No newline at end of file diff --git a/documentation/api/ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md b/documentation/api/ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md deleted file mode 100644 index 3d75df8..0000000 --- a/documentation/api/ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md +++ /dev/null @@ -1,46 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo') - -## ListUnDo(object, IList, int, T, bool) Constructor - -Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). - -```csharp -public ListUnDo(object? description, System.Collections.Generic.IList source, int index, T item, bool isAdd); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`source` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo.ListUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') - -The [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') on which the operation is performed. - - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The index of the operation. - - - -`item` [T](ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.T 'DefaultUnDo.ListUnDo.T') - -The argument of the operation. - - - -`isAdd` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -true if the operation is an [System.Collections.Generic.IList<>.IndexOf(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.IndexOf#System_Collections_Generic_IList_1_IndexOf__0_ 'System.Collections.Generic.IList`1.IndexOf(`0)'), else false for a [System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[source](ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool).source 'DefaultUnDo.ListUnDo.ListUnDo(object, System.Collections.Generic.IList, int, T, bool).source') is null. \ No newline at end of file diff --git a/documentation/api/ListUnDo_T_.md b/documentation/api/ListUnDo_T_.md deleted file mode 100644 index 87d733f..0000000 --- a/documentation/api/ListUnDo_T_.md +++ /dev/null @@ -1,33 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## ListUnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') operation. - -```csharp -public sealed class ListUnDo : -DefaultUnDo.IUnDo -``` -#### Type parameters - - - -`T` - -The type of element in the [System.Collections.Generic.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1'). - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ListUnDo - -Implements [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [ListUnDo(object, IList<T>, int, T, bool)](ListUnDo_T_.ListUnDo(object,IList_T_,int,T,bool).md 'DefaultUnDo.ListUnDo.ListUnDo(object, System.Collections.Generic.IList, int, T, bool)') | Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). | -| [ListUnDo(IList<T>, int, T, bool)](ListUnDo_T_.ListUnDo(IList_T_,int,T,bool).md 'DefaultUnDo.ListUnDo.ListUnDo(System.Collections.Generic.IList, int, T, bool)') | Initialises an instance of [ListUnDo<T>](ListUnDo_T_.md 'DefaultUnDo.ListUnDo'). | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IUnDo.Description](ListUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](ListUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](ListUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.ListUnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/UnDo.DefaultUnDo.IUnDo.Description.md b/documentation/api/UnDo.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index 37766e0..0000000 --- a/documentation/api/UnDo.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDo](UnDo.md 'DefaultUnDo.UnDo') - -## UnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/UnDo.DefaultUnDo.IUnDo.Do().md b/documentation/api/UnDo.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index 256e5d9..0000000 --- a/documentation/api/UnDo.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDo](UnDo.md 'DefaultUnDo.UnDo') - -## UnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/UnDo.DefaultUnDo.IUnDo.Undo().md b/documentation/api/UnDo.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index d5c6ede..0000000 --- a/documentation/api/UnDo.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDo](UnDo.md 'DefaultUnDo.UnDo') - -## UnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/UnDo.UnDo(Action,Action).md b/documentation/api/UnDo.UnDo(Action,Action).md deleted file mode 100644 index f210cb1..0000000 --- a/documentation/api/UnDo.UnDo(Action,Action).md +++ /dev/null @@ -1,23 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDo](UnDo.md 'DefaultUnDo.UnDo') - -## UnDo(Action, Action) Constructor - -Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). - -```csharp -public UnDo(System.Action? doAction, System.Action? undoAction); -``` -#### Parameters - - - -`doAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The action called by [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()'). - - - -`undoAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The action called by [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()'). \ No newline at end of file diff --git a/documentation/api/UnDo.UnDo(object,Action,Action).md b/documentation/api/UnDo.UnDo(object,Action,Action).md deleted file mode 100644 index 3a01d08..0000000 --- a/documentation/api/UnDo.UnDo(object,Action,Action).md +++ /dev/null @@ -1,29 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDo](UnDo.md 'DefaultUnDo.UnDo') - -## UnDo(object, Action, Action) Constructor - -Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). - -```csharp -public UnDo(object? description, System.Action? doAction, System.Action? undoAction); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`doAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The action called by [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()'). - - - -`undoAction` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action') - -The action called by [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()'). \ No newline at end of file diff --git a/documentation/api/UnDo.md b/documentation/api/UnDo.md deleted file mode 100644 index 96ec576..0000000 --- a/documentation/api/UnDo.md +++ /dev/null @@ -1,26 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for custom do and undo action. - -```csharp -public sealed class UnDo : -DefaultUnDo.IUnDo -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 UnDo - -Implements [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [UnDo(object, Action, Action)](UnDo.UnDo(object,Action,Action).md 'DefaultUnDo.UnDo.UnDo(object, System.Action, System.Action)') | Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). | -| [UnDo(Action, Action)](UnDo.UnDo(Action,Action).md 'DefaultUnDo.UnDo.UnDo(System.Action, System.Action)') | Initialises an instance of [UnDo](UnDo.md 'DefaultUnDo.UnDo'). | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IUnDo.Description](UnDo.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](UnDo.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](UnDo.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.UnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/UnDoCollectionAction.md b/documentation/api/UnDoCollectionAction.md deleted file mode 100644 index 8c4b3cc..0000000 --- a/documentation/api/UnDoCollectionAction.md +++ /dev/null @@ -1,101 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDoCollectionAction Enum - -Describes the action that will be performed on an [System.Collections.Generic.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System.Collections.Generic.ICollection`1') and recorded by an [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - -```csharp -public enum UnDoCollectionAction -``` -### Fields - - - -`ICollectionAdd` 0 - -[System.Collections.Generic.ICollection<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System.Collections.Generic.ICollection`1.Add(`0)') will be performed. - - - -`ICollectionClear` 2 - -[System.Collections.Generic.ICollection<>.Clear](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Clear 'System.Collections.Generic.ICollection`1.Clear') will be performed. - - - -`ICollectionRemove` 1 - -[System.Collections.Generic.ICollection<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System.Collections.Generic.ICollection`1.Remove(`0)') will be performed. - - - -`IDictionaryAdd` 12 - -[System.Collections.Generic.IDictionary<>.Add(@0,@1)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System.Collections.Generic.IDictionary`2.Add(`0,`1)') will be performed. - - - -`IDictionaryIndexer` 14 - -[System.Collections.Generic.IDictionary<>.Item(@@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Item#System_Collections_Generic_IDictionary_2_Item___0_ 'System.Collections.Generic.IDictionary`2.Item(``0)') will be performed. - - - -`IDictionaryRemove` 13 - -[System.Collections.Generic.IDictionary<>.Remove(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System.Collections.Generic.IDictionary`2.Remove(`0)') will be performed. - - - -`IListIndexer` 11 - -[System.Collections.Generic.IList<>.Item(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Item#System_Collections_Generic_IList_1_Item_System_Int32_ 'System.Collections.Generic.IList`1.Item(System.Int32)') will be performed. - - - -`IListInsert` 9 - -[System.Collections.Generic.IList<>.Insert(System.Int32,@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System.Collections.Generic.IList`1.Insert(System.Int32,`0)') will be performed. - - - -`IListMove` 8 - -[Move<T>(this IList<T>, int, int)](IListExtension.Move_T_(thisIList_T_,int,int).md 'DefaultUnDo.IListExtension.Move(this System.Collections.Generic.IList, int, int)') will be performed. - - - -`IListRemoveAt` 10 - -[System.Collections.Generic.IList<>.RemoveAt(System.Int32)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System.Collections.Generic.IList`1.RemoveAt(System.Int32)') will be performed. - - - -`ISetAdd` 3 - -[System.Collections.Generic.ISet<>.Add(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.Add#System_Collections_Generic_ISet_1_Add__0_ 'System.Collections.Generic.ISet`1.Add(`0)') will be performed. - - - -`ISetExceptWith` 4 - -[System.Collections.Generic.ISet<>.ExceptWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.ExceptWith#System_Collections_Generic_ISet_1_ExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.ExceptWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - - -`ISetIntersectWith` 5 - -[System.Collections.Generic.ISet<>.IntersectWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.IntersectWith#System_Collections_Generic_ISet_1_IntersectWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.IntersectWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - - -`ISetSymmetricExceptWith` 6 - -[System.Collections.Generic.ISet<>.SymmetricExceptWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.SymmetricExceptWith#System_Collections_Generic_ISet_1_SymmetricExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.SymmetricExceptWith(System.Collections.Generic.IEnumerable{`0})') will be performed. - - - -`ISetUnionWith` 7 - -[System.Collections.Generic.ISet<>.UnionWith(System.Collections.Generic.IEnumerable{@0})](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.UnionWith#System_Collections_Generic_ISet_1_UnionWith_System_Collections_Generic_IEnumerable{_0}_ 'System.Collections.Generic.ISet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})') will be performed. \ No newline at end of file diff --git a/documentation/api/UnDoCollectionOperation.Action.md b/documentation/api/UnDoCollectionOperation.Action.md deleted file mode 100644 index 45b399d..0000000 --- a/documentation/api/UnDoCollectionOperation.Action.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') - -## UnDoCollectionOperation.Action Property - -Gets the action performed. - -```csharp -public DefaultUnDo.UnDoCollectionAction Action { get; } -``` - -#### Property Value -[UnDoCollectionAction](UnDoCollectionAction.md 'DefaultUnDo.UnDoCollectionAction') \ No newline at end of file diff --git a/documentation/api/UnDoCollectionOperation.Collection.md b/documentation/api/UnDoCollectionOperation.Collection.md deleted file mode 100644 index b2066f5..0000000 --- a/documentation/api/UnDoCollectionOperation.Collection.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') - -## UnDoCollectionOperation.Collection Property - -Gets the collection on which the action is performed. - -```csharp -public object Collection { get; } -``` - -#### Property Value -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') \ No newline at end of file diff --git a/documentation/api/UnDoCollectionOperation.Parameters.md b/documentation/api/UnDoCollectionOperation.Parameters.md deleted file mode 100644 index 7271d3e..0000000 --- a/documentation/api/UnDoCollectionOperation.Parameters.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') - -## UnDoCollectionOperation.Parameters Property - -Gets the parameters of the action performed. - -```csharp -public object?[] Parameters { get; } -``` - -#### Property Value -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') \ No newline at end of file diff --git a/documentation/api/UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md b/documentation/api/UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md deleted file mode 100644 index 9bb3ad0..0000000 --- a/documentation/api/UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md +++ /dev/null @@ -1,29 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') - -## UnDoCollectionOperation(object, UnDoCollectionAction, object[]) Constructor - -Initializes a new instance of the [UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') struct. - -```csharp -public UnDoCollectionOperation(object collection, DefaultUnDo.UnDoCollectionAction action, params object?[] parameters); -``` -#### Parameters - - - -`collection` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The collection on which the action is performed. - - - -`action` [UnDoCollectionAction](UnDoCollectionAction.md 'DefaultUnDo.UnDoCollectionAction') - -The action performed. - - - -`parameters` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - -The parameters of the action performed. \ No newline at end of file diff --git a/documentation/api/UnDoCollectionOperation.md b/documentation/api/UnDoCollectionOperation.md deleted file mode 100644 index c1728da..0000000 --- a/documentation/api/UnDoCollectionOperation.md +++ /dev/null @@ -1,20 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDoCollectionOperation Struct - -Provides data for the operation about to be performed on an undo collection. - -```csharp -public readonly struct UnDoCollectionOperation -``` - -| Constructors | | -| :--- | :--- | -| [UnDoCollectionOperation(object, UnDoCollectionAction, object[])](UnDoCollectionOperation.UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md 'DefaultUnDo.UnDoCollectionOperation.UnDoCollectionOperation(object, DefaultUnDo.UnDoCollectionAction, object[])') | Initializes a new instance of the [UnDoCollectionOperation](UnDoCollectionOperation.md 'DefaultUnDo.UnDoCollectionOperation') struct. | - -| Properties | | -| :--- | :--- | -| [Action](UnDoCollectionOperation.Action.md 'DefaultUnDo.UnDoCollectionOperation.Action') | Gets the action performed. | -| [Collection](UnDoCollectionOperation.Collection.md 'DefaultUnDo.UnDoCollectionOperation.Collection') | Gets the collection on which the action is performed. | -| [Parameters](UnDoCollectionOperation.Parameters.md 'DefaultUnDo.UnDoCollectionOperation.Parameters') | Gets the parameters of the action performed. | diff --git a/documentation/api/UnDoFieldChange_T_.NewValue.md b/documentation/api/UnDoFieldChange_T_.NewValue.md deleted file mode 100644 index 0360187..0000000 --- a/documentation/api/UnDoFieldChange_T_.NewValue.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') - -## UnDoFieldChange.NewValue Property - -Gets the field new value. - -```csharp -public T NewValue { get; } -``` - -#### Property Value -[T](UnDoFieldChange_T_.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo.UnDoFieldChange.T') \ No newline at end of file diff --git a/documentation/api/UnDoFieldChange_T_.OldValue.md b/documentation/api/UnDoFieldChange_T_.OldValue.md deleted file mode 100644 index b5bb55b..0000000 --- a/documentation/api/UnDoFieldChange_T_.OldValue.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') - -## UnDoFieldChange.OldValue Property - -Gets the field old value. - -```csharp -public T OldValue { get; } -``` - -#### Property Value -[T](UnDoFieldChange_T_.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo.UnDoFieldChange.T') \ No newline at end of file diff --git a/documentation/api/UnDoFieldChange_T_.UnDoFieldChange(T,T).md b/documentation/api/UnDoFieldChange_T_.UnDoFieldChange(T,T).md deleted file mode 100644 index a7cf0f8..0000000 --- a/documentation/api/UnDoFieldChange_T_.UnDoFieldChange(T,T).md +++ /dev/null @@ -1,23 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') - -## UnDoFieldChange(T, T) Constructor - -Initializes a new instance of the [UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') struct. - -```csharp -public UnDoFieldChange(T oldValue, T newValue); -``` -#### Parameters - - - -`oldValue` [T](UnDoFieldChange_T_.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo.UnDoFieldChange.T') - -The old value of the field. - - - -`newValue` [T](UnDoFieldChange_T_.md#DefaultUnDo.UnDoFieldChange_T_.T 'DefaultUnDo.UnDoFieldChange.T') - -The new value of the field. \ No newline at end of file diff --git a/documentation/api/UnDoFieldChange_T_.md b/documentation/api/UnDoFieldChange_T_.md deleted file mode 100644 index dfb4321..0000000 --- a/documentation/api/UnDoFieldChange_T_.md +++ /dev/null @@ -1,24 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDoFieldChange Struct - -Describes a value change operation done on a [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - -```csharp -public readonly struct UnDoFieldChange -``` -#### Type parameters - - - -`T` - -| Constructors | | -| :--- | :--- | -| [UnDoFieldChange(T, T)](UnDoFieldChange_T_.UnDoFieldChange(T,T).md 'DefaultUnDo.UnDoFieldChange.UnDoFieldChange(T, T)') | Initializes a new instance of the [UnDoFieldChange<T>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange') struct. | - -| Properties | | -| :--- | :--- | -| [NewValue](UnDoFieldChange_T_.NewValue.md 'DefaultUnDo.UnDoFieldChange.NewValue') | Gets the field new value. | -| [OldValue](UnDoFieldChange_T_.OldValue.md 'DefaultUnDo.UnDoFieldChange.OldValue') | Gets the field old value. | diff --git a/documentation/api/UnDoField_T_.PostSet(T).md b/documentation/api/UnDoField_T_.PostSet(T).md deleted file mode 100644 index df46f39..0000000 --- a/documentation/api/UnDoField_T_.PostSet(T).md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField.PostSet(T) Method - -performs a post set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -protected virtual void PostSet(T oldValue); -``` -#### Parameters - - - -`oldValue` [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') - -The old value. \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.PreSet(T).md b/documentation/api/UnDoField_T_.PreSet(T).md deleted file mode 100644 index 5d8de5d..0000000 --- a/documentation/api/UnDoField_T_.PreSet(T).md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField.PreSet(T) Method - -Performs a pre set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. - -```csharp -protected virtual void PreSet(T newValue); -``` -#### Parameters - - - -`newValue` [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') - -The new value. \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.ToT().md b/documentation/api/UnDoField_T_.ToT().md deleted file mode 100644 index 3250e74..0000000 --- a/documentation/api/UnDoField_T_.ToT().md +++ /dev/null @@ -1,14 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField.ToT() Method - -Returns the underlying [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T'). - -```csharp -public T ToT(); -``` - -#### Returns -[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') -The underlying [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T'). \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md b/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md deleted file mode 100644 index bbb7d5e..0000000 --- a/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md +++ /dev/null @@ -1,28 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField(IUnDoManager, Func,object>) Constructor - -Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - -```csharp -public UnDoField(DefaultUnDo.IUnDoManager manager, System.Func,object?>? descriptionFactory=null); -``` -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') used to register the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[DefaultUnDo.UnDoFieldChange<](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange')[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T')[>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_).manager 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, System.Func,object>).manager') is null. \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md b/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md deleted file mode 100644 index 8a4680e..0000000 --- a/documentation/api/UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md +++ /dev/null @@ -1,34 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField(IUnDoManager, T, Func,object>) Constructor - -Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). - -```csharp -public UnDoField(DefaultUnDo.IUnDoManager manager, T value, System.Func,object?>? descriptionFactory=null); -``` -#### Parameters - - - -`manager` [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') - -The [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager') used to register the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - - - -`value` [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') - -The starting value of the [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - - - -`descriptionFactory` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[DefaultUnDo.UnDoFieldChange<](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange')[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T')[>](UnDoFieldChange_T_.md 'DefaultUnDo.UnDoFieldChange')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - -Factory used to create the description of the generated [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[manager](UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_).manager 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, T, System.Func,object>).manager') is null. \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.Value.md b/documentation/api/UnDoField_T_.Value.md deleted file mode 100644 index 384c5c1..0000000 --- a/documentation/api/UnDoField_T_.Value.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField.Value Property - -Gets or sets the value of the field, generating a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on set. - -```csharp -public T Value { get; set; } -``` - -#### Property Value -[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.implicitoperatorT(UnDoField_T_).md b/documentation/api/UnDoField_T_.implicitoperatorT(UnDoField_T_).md deleted file mode 100644 index 2025f7f..0000000 --- a/documentation/api/UnDoField_T_.implicitoperatorT(UnDoField_T_).md +++ /dev/null @@ -1,18 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -## UnDoField.implicit operator T(UnDoField) Operator - -Defines an implicit conversion of a [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') to a [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T'). - -```csharp -public static T implicit operator T(DefaultUnDo.UnDoField field); -``` -#### Parameters - - - -`field` [DefaultUnDo.UnDoField<](UnDoField_T_.md 'DefaultUnDo.UnDoField')[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T')[>](UnDoField_T_.md 'DefaultUnDo.UnDoField') - -#### Returns -[T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T') \ No newline at end of file diff --git a/documentation/api/UnDoField_T_.md b/documentation/api/UnDoField_T_.md deleted file mode 100644 index 8ea64fd..0000000 --- a/documentation/api/UnDoField_T_.md +++ /dev/null @@ -1,37 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDoField Class - -Provides a simple wrapper for a field to automatically generate [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public class UnDoField - where T : notnull -``` -#### Type parameters - - - -`T` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 UnDoField - -| Constructors | | -| :--- | :--- | -| [UnDoField(IUnDoManager, Func<UnDoFieldChange<T>,object>)](UnDoField_T_.UnDoField(IUnDoManager,Func_UnDoFieldChange_T_,object_).md 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, System.Func,object>)') | Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). | -| [UnDoField(IUnDoManager, T, Func<UnDoFieldChange<T>,object>)](UnDoField_T_.UnDoField(IUnDoManager,T,Func_UnDoFieldChange_T_,object_).md 'DefaultUnDo.UnDoField.UnDoField(DefaultUnDo.IUnDoManager, T, System.Func,object>)') | Creates a new instance of [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField'). | - -| Properties | | -| :--- | :--- | -| [Value](UnDoField_T_.Value.md 'DefaultUnDo.UnDoField.Value') | Gets or sets the value of the field, generating a [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation on set. | - -| Methods | | -| :--- | :--- | -| [PostSet(T)](UnDoField_T_.PostSet(T).md 'DefaultUnDo.UnDoField.PostSet(T)') | performs a post set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [PreSet(T)](UnDoField_T_.PreSet(T).md 'DefaultUnDo.UnDoField.PreSet(T)') | Performs a pre set treatment, included in the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operation. | -| [ToT()](UnDoField_T_.ToT().md 'DefaultUnDo.UnDoField.ToT()') | Returns the underlying [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T'). | - -| Operators | | -| :--- | :--- | -| [implicit operator T(UnDoField<T>)](UnDoField_T_.implicitoperatorT(UnDoField_T_).md 'DefaultUnDo.UnDoField.op_Implicit T(DefaultUnDo.UnDoField)') | Defines an implicit conversion of a [UnDoField<T>](UnDoField_T_.md 'DefaultUnDo.UnDoField') to a [T](UnDoField_T_.md#DefaultUnDo.UnDoField_T_.T 'DefaultUnDo.UnDoField.T'). | diff --git a/documentation/api/UnDoManager.BeginTransaction(object).md b/documentation/api/UnDoManager.BeginTransaction(object).md deleted file mode 100644 index 92c48c9..0000000 --- a/documentation/api/UnDoManager.BeginTransaction(object).md +++ /dev/null @@ -1,24 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.BeginTransaction(object) Method - -Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group. -If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). - -```csharp -public DefaultUnDo.IUnDoTransaction BeginTransaction(object? description=null); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the group of operations. - -Implements [BeginTransaction(object)](IUnDoManager.BeginTransaction(object).md 'DefaultUnDo.IUnDoManager.BeginTransaction(object)') - -#### Returns -[IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') -An [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to commit or rollback the transaction of operations. \ No newline at end of file diff --git a/documentation/api/UnDoManager.CanRedo.md b/documentation/api/UnDoManager.CanRedo.md deleted file mode 100644 index 5edcbf0..0000000 --- a/documentation/api/UnDoManager.CanRedo.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.CanRedo Property - -Returns a boolean to express if the method [Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()') can be executed. - -```csharp -public bool CanRedo { get; } -``` - -Implements [CanRedo](IUnDoManager.CanRedo.md 'DefaultUnDo.IUnDoManager.CanRedo') - -#### Property Value -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/documentation/api/UnDoManager.CanUndo.md b/documentation/api/UnDoManager.CanUndo.md deleted file mode 100644 index 3f65516..0000000 --- a/documentation/api/UnDoManager.CanUndo.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.CanUndo Property - -Returns a boolean to express if the method [Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()') can be executed. - -```csharp -public bool CanUndo { get; } -``` - -Implements [CanUndo](IUnDoManager.CanUndo.md 'DefaultUnDo.IUnDoManager.CanUndo') - -#### Property Value -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/documentation/api/UnDoManager.Clear().md b/documentation/api/UnDoManager.Clear().md deleted file mode 100644 index ff7b528..0000000 --- a/documentation/api/UnDoManager.Clear().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.Clear() Method - -Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. - -```csharp -public void Clear(); -``` - -Implements [Clear()](IUnDoManager.Clear().md 'DefaultUnDo.IUnDoManager.Clear()') \ No newline at end of file diff --git a/documentation/api/UnDoManager.Do(IUnDo).md b/documentation/api/UnDoManager.Do(IUnDo).md deleted file mode 100644 index 8bde163..0000000 --- a/documentation/api/UnDoManager.Do(IUnDo).md +++ /dev/null @@ -1,24 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.Do(IUnDo) Method - -Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. - -```csharp -public void Do(DefaultUnDo.IUnDo command); -``` -#### Parameters - - - -`command` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') to execute. - -Implements [Do(IUnDo)](IUnDoManager.Do(IUnDo).md 'DefaultUnDo.IUnDoManager.Do(DefaultUnDo.IUnDo)') - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[command](UnDoManager.Do(IUnDo).md#DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo).command 'DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo).command') is null. \ No newline at end of file diff --git a/documentation/api/UnDoManager.PropertyChanged.md b/documentation/api/UnDoManager.PropertyChanged.md deleted file mode 100644 index f711131..0000000 --- a/documentation/api/UnDoManager.PropertyChanged.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.PropertyChanged Event - -Occurs when a property value changes. - -```csharp -public event PropertyChangedEventHandler? PropertyChanged; -``` - -Implements [PropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged.PropertyChanged 'System.ComponentModel.INotifyPropertyChanged.PropertyChanged') - -#### Event Type -[System.ComponentModel.PropertyChangedEventHandler](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.PropertyChangedEventHandler 'System.ComponentModel.PropertyChangedEventHandler') \ No newline at end of file diff --git a/documentation/api/UnDoManager.Redo().md b/documentation/api/UnDoManager.Redo().md deleted file mode 100644 index 7de70d1..0000000 --- a/documentation/api/UnDoManager.Redo().md +++ /dev/null @@ -1,20 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.Redo() Method - -Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - -```csharp -public void Redo(); -``` - -Implements [Redo()](IUnDoManager.Redo().md 'DefaultUnDo.IUnDoManager.Redo()') - -#### Exceptions - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Cannot perform [Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()') while a group operation is going on. - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -There is no action to redo. \ No newline at end of file diff --git a/documentation/api/UnDoManager.RedoDescriptions.md b/documentation/api/UnDoManager.RedoDescriptions.md deleted file mode 100644 index 811f85d..0000000 --- a/documentation/api/UnDoManager.RedoDescriptions.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.RedoDescriptions Property - -Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. - -```csharp -public System.Collections.Generic.IEnumerable RedoDescriptions { get; } -``` - -Implements [RedoDescriptions](IUnDoManager.RedoDescriptions.md 'DefaultUnDo.IUnDoManager.RedoDescriptions') - -#### Property Value -[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') \ No newline at end of file diff --git a/documentation/api/UnDoManager.UnDoManager().md b/documentation/api/UnDoManager.UnDoManager().md deleted file mode 100644 index 4826cb7..0000000 --- a/documentation/api/UnDoManager.UnDoManager().md +++ /dev/null @@ -1,10 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager() Constructor - -Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). - -```csharp -public UnDoManager(); -``` \ No newline at end of file diff --git a/documentation/api/UnDoManager.UnDoManager(int).md b/documentation/api/UnDoManager.UnDoManager(int).md deleted file mode 100644 index 193eb4f..0000000 --- a/documentation/api/UnDoManager.UnDoManager(int).md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager(int) Constructor - -Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). - -```csharp -public UnDoManager(int maxCapacity); -``` -#### Parameters - - - -`maxCapacity` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - -The maximum number of operation this [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') can record before errasing oldest ones. \ No newline at end of file diff --git a/documentation/api/UnDoManager.Undo().md b/documentation/api/UnDoManager.Undo().md deleted file mode 100644 index 4a2c3b8..0000000 --- a/documentation/api/UnDoManager.Undo().md +++ /dev/null @@ -1,20 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.Undo() Method - -Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. - -```csharp -public void Undo(); -``` - -Implements [Undo()](IUnDoManager.Undo().md 'DefaultUnDo.IUnDoManager.Undo()') - -#### Exceptions - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -Cannot perform [Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()') while a group operation is going on. - -[System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') -There is no action to undo. \ No newline at end of file diff --git a/documentation/api/UnDoManager.UndoDescriptions.md b/documentation/api/UnDoManager.UndoDescriptions.md deleted file mode 100644 index 8c4119d..0000000 --- a/documentation/api/UnDoManager.UndoDescriptions.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.UndoDescriptions Property - -Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. - -```csharp -public System.Collections.Generic.IEnumerable UndoDescriptions { get; } -``` - -Implements [UndoDescriptions](IUnDoManager.UndoDescriptions.md 'DefaultUnDo.IUnDoManager.UndoDescriptions') - -#### Property Value -[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') \ No newline at end of file diff --git a/documentation/api/UnDoManager.Version.md b/documentation/api/UnDoManager.Version.md deleted file mode 100644 index b69bd71..0000000 --- a/documentation/api/UnDoManager.Version.md +++ /dev/null @@ -1,15 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager') - -## UnDoManager.Version Property - -Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). - -```csharp -public int Version { get; set; } -``` - -Implements [Version](IUnDoManager.Version.md 'DefaultUnDo.IUnDoManager.Version') - -#### Property Value -[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/documentation/api/UnDoManager.md b/documentation/api/UnDoManager.md deleted file mode 100644 index 63c53a4..0000000 --- a/documentation/api/UnDoManager.md +++ /dev/null @@ -1,41 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## UnDoManager Class - -Provides an implementation of the command pattern to execute operations and return to a previous state by undoing them. - -```csharp -public sealed class UnDoManager : -DefaultUnDo.IUnDoManager, -System.ComponentModel.INotifyPropertyChanged -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 UnDoManager - -Implements [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'), [System.ComponentModel.INotifyPropertyChanged](https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.INotifyPropertyChanged 'System.ComponentModel.INotifyPropertyChanged') - -| Constructors | | -| :--- | :--- | -| [UnDoManager()](UnDoManager.UnDoManager().md 'DefaultUnDo.UnDoManager.UnDoManager()') | Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). | -| [UnDoManager(int)](UnDoManager.UnDoManager(int).md 'DefaultUnDo.UnDoManager.UnDoManager(int)') | Initialises an instance of [UnDoManager](UnDoManager.md 'DefaultUnDo.UnDoManager'). | - -| Properties | | -| :--- | :--- | -| [CanRedo](UnDoManager.CanRedo.md 'DefaultUnDo.UnDoManager.CanRedo') | Returns a boolean to express if the method [Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()') can be executed. | -| [CanUndo](UnDoManager.CanUndo.md 'DefaultUnDo.UnDoManager.CanUndo') | Returns a boolean to express if the method [Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()') can be executed. | -| [RedoDescriptions](UnDoManager.RedoDescriptions.md 'DefaultUnDo.UnDoManager.RedoDescriptions') | Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be redone. | -| [UndoDescriptions](UnDoManager.UndoDescriptions.md 'DefaultUnDo.UnDoManager.UndoDescriptions') | Gets the descriptions in order of all the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') which can be undone. | -| [Version](UnDoManager.Version.md 'DefaultUnDo.UnDoManager.Version') | Gets an [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') representing the state of the [IUnDoManager](IUnDoManager.md 'DefaultUnDo.IUnDoManager'). | - -| Methods | | -| :--- | :--- | -| [BeginTransaction(object)](UnDoManager.BeginTransaction(object).md 'DefaultUnDo.UnDoManager.BeginTransaction(object)') | Starts a group of operation and return an [IUnDoTransaction](IUnDoTransaction.md 'DefaultUnDo.IUnDoTransaction') to stop the group.
If [Commit()](IUnDoTransaction.Commit().md 'DefaultUnDo.IUnDoTransaction.Commit()') is not called, all operations done during the transaction will be undone on [System.IDisposable.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose'). | -| [Clear()](UnDoManager.Clear().md 'DefaultUnDo.UnDoManager.Clear()') | Clears the history of [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') operations. | -| [Do(IUnDo)](UnDoManager.Do(IUnDo).md 'DefaultUnDo.UnDoManager.Do(DefaultUnDo.IUnDo)') | Executes the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command and stores it in the manager hostory. | -| [Redo()](UnDoManager.Redo().md 'DefaultUnDo.UnDoManager.Redo()') | Redoes the last undone [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. | -| [Undo()](UnDoManager.Undo().md 'DefaultUnDo.UnDoManager.Undo()') | Undoes the last executed [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') command of the manager history. | - -| Events | | -| :--- | :--- | -| [PropertyChanged](UnDoManager.PropertyChanged.md 'DefaultUnDo.UnDoManager.PropertyChanged') | Occurs when a property value changes. | diff --git a/documentation/api/ValueUnDo.MergeDescriptionAction.md b/documentation/api/ValueUnDo.MergeDescriptionAction.md deleted file mode 100644 index c59874b..0000000 --- a/documentation/api/ValueUnDo.MergeDescriptionAction.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](ValueUnDo.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeDescriptionAction Property - -The [MergeDescriptionHandler(object, object)](ValueUnDo.MergeDescriptionHandler(object,object).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. - -```csharp -public static DefaultUnDo.ValueUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } -``` - -#### Property Value -[MergeDescriptionHandler(object, object)](ValueUnDo.MergeDescriptionHandler(object,object).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object)') \ No newline at end of file diff --git a/documentation/api/ValueUnDo.MergeDescriptionHandler(object,object).md b/documentation/api/ValueUnDo.MergeDescriptionHandler(object,object).md deleted file mode 100644 index 98ea189..0000000 --- a/documentation/api/ValueUnDo.MergeDescriptionHandler(object,object).md +++ /dev/null @@ -1,26 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](ValueUnDo.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeDescriptionHandler(object, object) Delegate - -Represents a method that will be called when merging two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances to get the resulting description. - -```csharp -public delegate object? ValueUnDo.MergeDescriptionHandler(object? oldDescription, object? newDescription); -``` -#### Parameters - - - -`oldDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the previous [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') merged. - - - -`newDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the new [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') merged. - -#### Returns -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') \ No newline at end of file diff --git a/documentation/api/ValueUnDo.MergeInterval.md b/documentation/api/ValueUnDo.MergeInterval.md deleted file mode 100644 index c57d0e8..0000000 --- a/documentation/api/ValueUnDo.MergeInterval.md +++ /dev/null @@ -1,14 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo](ValueUnDo.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeInterval Property - -The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable. -Default value is 500ms. - -```csharp -public static System.TimeSpan MergeInterval { get; set; } -``` - -#### Property Value -[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') \ No newline at end of file diff --git a/documentation/api/ValueUnDo.md b/documentation/api/ValueUnDo.md deleted file mode 100644 index 0587730..0000000 --- a/documentation/api/ValueUnDo.md +++ /dev/null @@ -1,17 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## ValueUnDo Class - -Provides a global [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') to use as default merge interval for all [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - -```csharp -public static class ValueUnDo -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ValueUnDo - -| Properties | | -| :--- | :--- | -| [MergeDescriptionAction](ValueUnDo.MergeDescriptionAction.md 'DefaultUnDo.ValueUnDo.MergeDescriptionAction') | The [MergeDescriptionHandler(object, object)](ValueUnDo.MergeDescriptionHandler(object,object).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, object)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. | -| [MergeInterval](ValueUnDo.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval') | The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable.
Default value is 500ms. | diff --git a/documentation/api/ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md b/documentation/api/ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md deleted file mode 100644 index ffa383f..0000000 --- a/documentation/api/ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md +++ /dev/null @@ -1,25 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo) Method - -Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). - -```csharp -bool DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo other, out DefaultUnDo.IUnDo? mergedCommand); -``` -#### Parameters - - - -`other` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The other [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance the current one should try to merge with. - - - -`mergedCommand` [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -The resulting merged [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') instance if the operation was successful. - -Implements [TryMerge(IUnDo, IUnDo)](IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md b/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md deleted file mode 100644 index 1843a0f..0000000 --- a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.DefaultUnDo.IUnDo.Description Property - -Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. - -```csharp -object? DefaultUnDo.IUnDo.Description { get; } -``` - -Implements [Description](IUnDo.Description.md 'DefaultUnDo.IUnDo.Description') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md b/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md deleted file mode 100644 index e3deefe..0000000 --- a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.DefaultUnDo.IUnDo.Do() Method - -Does an action. - -```csharp -void DefaultUnDo.IUnDo.Do(); -``` - -Implements [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md b/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md deleted file mode 100644 index d3eeb41..0000000 --- a/documentation/api/ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md +++ /dev/null @@ -1,12 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.DefaultUnDo.IUnDo.Undo() Method - -Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. - -```csharp -void DefaultUnDo.IUnDo.Undo(); -``` - -Implements [Undo()](IUnDo.Undo().md 'DefaultUnDo.IUnDo.Undo()') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.MergeDescriptionAction.md b/documentation/api/ValueUnDo_T_.MergeDescriptionAction.md deleted file mode 100644 index 4cb12da..0000000 --- a/documentation/api/ValueUnDo_T_.MergeDescriptionAction.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeDescriptionAction Property - -The [MergeDescriptionHandler(object, T, object, T)](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. - -```csharp -public static DefaultUnDo.ValueUnDo.MergeDescriptionHandler? MergeDescriptionAction { get; set; } -``` - -#### Property Value -[DefaultUnDo.ValueUnDo.MergeDescriptionHandler<](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)')[T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T')[>](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md b/documentation/api/ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md deleted file mode 100644 index e4b4c8c..0000000 --- a/documentation/api/ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md +++ /dev/null @@ -1,44 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeDescriptionHandler(object, T, object, T) Delegate - -Represents a method that will be called when merging two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances to get the resulting description. - -```csharp -public delegate object ValueUnDo.MergeDescriptionHandler(object? oldDescription, T oldValue, object? newDescription, T newValue); -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`oldDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the previous [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') merged. - - - -`oldValue` [T](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md#DefaultUnDo.ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).T 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T).T') - -The old value used when undoing the resulting merged [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - - - -`newDescription` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of the new [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') merged. - - - -`newValue` [T](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md#DefaultUnDo.ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).T 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T).T') - -The new value used when redoing the resulting merged [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - -#### Returns -[System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') -The new description that will be using for the resulting merged [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.MergeInterval.md b/documentation/api/ValueUnDo_T_.MergeInterval.md deleted file mode 100644 index b35b8d6..0000000 --- a/documentation/api/ValueUnDo_T_.MergeInterval.md +++ /dev/null @@ -1,14 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo.MergeInterval Property - -The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable. -If not set, [MergeInterval](ValueUnDo.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval') will be used. - -```csharp -public static System.Nullable MergeInterval { get; set; } -``` - -#### Property Value -[System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md b/documentation/api/ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md deleted file mode 100644 index 9cd4c9e..0000000 --- a/documentation/api/ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md +++ /dev/null @@ -1,34 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo(Action, T, T) Constructor - -Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - -```csharp -public ValueUnDo(System.Action setter, T newValue, T oldValue); -``` -#### Parameters - - - -`setter` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') - -The action called to set the value. - - - -`newValue` [T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T') - -The new value. - - - -`oldValue` [T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T') - -The old value. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[setter](ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T).setter 'DefaultUnDo.ValueUnDo.ValueUnDo(System.Action, T, T).setter') is null. \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md b/documentation/api/ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md deleted file mode 100644 index 3b839b8..0000000 --- a/documentation/api/ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo').[ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') - -## ValueUnDo(object, Action, T, T) Constructor - -Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). - -```csharp -public ValueUnDo(object? description, System.Action setter, T newValue, T oldValue); -``` -#### Parameters - - - -`description` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') - -The description of this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - - - -`setter` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') - -The action called to set the value. - - - -`newValue` [T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T') - -The new value. - - - -`oldValue` [T](ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.T 'DefaultUnDo.ValueUnDo.T') - -The old value. - -#### Exceptions - -[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException') -[setter](ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T).setter 'DefaultUnDo.ValueUnDo.ValueUnDo(object, System.Action, T, T).setter') is null. \ No newline at end of file diff --git a/documentation/api/ValueUnDo_T_.md b/documentation/api/ValueUnDo_T_.md deleted file mode 100644 index c535e00..0000000 --- a/documentation/api/ValueUnDo_T_.md +++ /dev/null @@ -1,40 +0,0 @@ -#### [DefaultUnDo](DefaultUnDo.md 'DefaultUnDo') -### [DefaultUnDo](DefaultUnDo.md#DefaultUnDo 'DefaultUnDo') - -## ValueUnDo Class - -Provides an implementation of the [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') interface for setting value. - -```csharp -public sealed class ValueUnDo : -DefaultUnDo.IMergeableUnDo, -DefaultUnDo.IUnDo -``` -#### Type parameters - - - -`T` - -The type of value. - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ValueUnDo - -Implements [IMergeableUnDo](IMergeableUnDo.md 'DefaultUnDo.IMergeableUnDo'), [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') - -| Constructors | | -| :--- | :--- | -| [ValueUnDo(object, Action<T>, T, T)](ValueUnDo_T_.ValueUnDo(object,Action_T_,T,T).md 'DefaultUnDo.ValueUnDo.ValueUnDo(object, System.Action, T, T)') | Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). | -| [ValueUnDo(Action<T>, T, T)](ValueUnDo_T_.ValueUnDo(Action_T_,T,T).md 'DefaultUnDo.ValueUnDo.ValueUnDo(System.Action, T, T)') | Initialises an instance of [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo'). | - -| Properties | | -| :--- | :--- | -| [MergeDescriptionAction](ValueUnDo_T_.MergeDescriptionAction.md 'DefaultUnDo.ValueUnDo.MergeDescriptionAction') | The [MergeDescriptionHandler(object, T, object, T)](ValueUnDo_T_.MergeDescriptionHandler(object,T,object,T).md 'DefaultUnDo.ValueUnDo.MergeDescriptionHandler(object, T, object, T)') used to merge description between two [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instance. | -| [MergeInterval](ValueUnDo_T_.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval') | The [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') interval equivalent [ValueUnDo<T>](ValueUnDo_T_.md 'DefaultUnDo.ValueUnDo') instances should respect to be mergeable.
If not set, [MergeInterval](ValueUnDo.MergeInterval.md 'DefaultUnDo.ValueUnDo.MergeInterval') will be used. | - -| Explicit Interface Implementations | | -| :--- | :--- | -| [DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo, IUnDo)](ValueUnDo_T_.DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IMergeableUnDo.TryMerge(DefaultUnDo.IUnDo, DefaultUnDo.IUnDo)') | Merges the current instance with the specified [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo'). | -| [DefaultUnDo.IUnDo.Description](ValueUnDo_T_.DefaultUnDo.IUnDo.Description.md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Description') | Gets a description of what this [IUnDo](IUnDo.md 'DefaultUnDo.IUnDo') perform. | -| [DefaultUnDo.IUnDo.Do()](ValueUnDo_T_.DefaultUnDo.IUnDo.Do().md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Do()') | Does an action. | -| [DefaultUnDo.IUnDo.Undo()](ValueUnDo_T_.DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo.ValueUnDo.DefaultUnDo.IUnDo.Undo()') | Does the opposite of the [Do()](IUnDo.Do().md 'DefaultUnDo.IUnDo.Do()') action. | diff --git a/documentation/api/index.md b/documentation/api/index.md new file mode 100644 index 0000000..835f05d --- /dev/null +++ b/documentation/api/index.md @@ -0,0 +1,150 @@ +#### [DefaultUnDo](index.md 'index') + +## DefaultUnDo Assembly + +This is the full API documentation of DefaultUnDo\. +### Namespaces + + + +## DefaultUnDo Namespace +- **[CollectionUnDo<T>](DefaultUnDo/CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') operation\. + - **[CollectionUnDo\(object, ICollection<T>, T, bool\)](DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(object,System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(object, System\.Collections\.Generic\.ICollection\, T, bool\)')** `Constructor` Initialise an instance of [CollectionUnDo<T>](DefaultUnDo/CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\')\. + - **[CollectionUnDo\(ICollection<T>, T, bool\)](DefaultUnDo/CollectionUnDo_T_/CollectionUnDo_T_.md#DefaultUnDo.CollectionUnDo_T_.CollectionUnDo(System.Collections.Generic.ICollection_T_,T,bool) 'DefaultUnDo\.CollectionUnDo\\.CollectionUnDo\(System\.Collections\.Generic\.ICollection\, T, bool\)')** `Constructor` Initialise an instance of [CollectionUnDo<T>](DefaultUnDo/CollectionUnDo_T_/index.md 'DefaultUnDo\.CollectionUnDo\')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/CollectionUnDo_T_/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.CollectionUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[DictionaryUnDo<TKey,TValue>](DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') operation\. + - **[DictionaryUnDo\(object, IDictionary<TKey,TValue>, TKey, TValue, bool\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(object,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(object, System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)')** `Constructor` Initialise an instance of [DictionaryUnDo<TKey,TValue>](DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\')\. + - **[DictionaryUnDo\(IDictionary<TKey,TValue>, TKey, TValue, bool\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DictionaryUnDo_TKey,TValue_.md#DefaultUnDo.DictionaryUnDo_TKey,TValue_.DictionaryUnDo(System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,bool) 'DefaultUnDo\.DictionaryUnDo\\.DictionaryUnDo\(System\.Collections\.Generic\.IDictionary\, TKey, TValue, bool\)')** `Constructor` Initialise an instance of [DictionaryUnDo<TKey,TValue>](DefaultUnDo/DictionaryUnDo_TKey,TValue_/index.md 'DefaultUnDo\.DictionaryUnDo\')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/DictionaryUnDo_TKey,TValue_/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.DictionaryUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for a group of operations\. + - **[GroupUnDo\(IUnDo\[\]\)](DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(DefaultUnDo\.IUnDo\[\]\)')** `Constructor` Initialise an instance of [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo')\. + - **[GroupUnDo\(object, IUnDo\[\]\)](DefaultUnDo/GroupUnDo/GroupUnDo.md#DefaultUnDo.GroupUnDo.GroupUnDo(object,DefaultUnDo.IUnDo[]) 'DefaultUnDo\.GroupUnDo\.GroupUnDo\(object, DefaultUnDo\.IUnDo\[\]\)')** `Constructor` Initialise an instance of [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo')\. + - **[MergeDescriptionAction](DefaultUnDo/GroupUnDo/MergeDescriptionAction.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler\(object, object, object\)](DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionHandler\(object, object, object\)') used to merge description between a [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and a [IMergeableUnDo](DefaultUnDo/IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') instances\. + - **[TryGetSingle<T>\(T\)](DefaultUnDo/GroupUnDo/TryGetSingle_T_(T).md 'DefaultUnDo\.GroupUnDo\.TryGetSingle\\(T\)')** `Method` Gets the single T of this instance\. + - **[DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\)](DefaultUnDo/GroupUnDo/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)')** `Explicit Interface Implementation` Merges the current instance with the specified [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/GroupUnDo/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.GroupUnDo\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[ICollectionExtensions](DefaultUnDo/ICollectionExtensions/index.md 'DefaultUnDo\.ICollectionExtensions')** `Class` Provides a method to wrap an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') to an UnDo collection linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[AsUnDo<T>\(this ICollection<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](DefaultUnDo/ICollectionExtensions/AsUnDo_T_(thisICollection_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.ICollectionExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ICollection\, DefaultUnDo\.IUnDoManager, System\.Func\\)')** `Method` Wraps an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') to an UnDo collection linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. +- **[IDictionaryExtensions](DefaultUnDo/IDictionaryExtensions/index.md 'DefaultUnDo\.IDictionaryExtensions')** `Class` Provides a method to wrap an [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') to an UnDo dictionary linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[AsUnDo<TKey,TValue>\(this IDictionary<TKey,TValue>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](DefaultUnDo/IDictionaryExtensions/AsUnDo_TKey,TValue_(thisIDictionary_TKey,TValue_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.IDictionaryExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IDictionary\, DefaultUnDo\.IUnDoManager, System\.Func\\)')** `Method` Wraps an [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') to an UnDo dictionary linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. +- **[IListExtensions](DefaultUnDo/IListExtensions/index.md 'DefaultUnDo\.IListExtensions')** `Class` Provides a method to wrap an [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') to an UnDo list linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[AsUnDo<T>\(this IList<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](DefaultUnDo/IListExtensions/AsUnDo_T_(thisIList_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.IListExtensions\.AsUnDo\\(this System\.Collections\.Generic\.IList\, DefaultUnDo\.IUnDoManager, System\.Func\\)')** `Method` Wraps an [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') to an UnDo list linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[Move<T>\(this IList<T>, int, int\)](DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)')** `Method` Moves the item at the specified index to a new location in the collection\. If source is an UnDo list and its inner source an [System\.Collections\.ObjectModel\.ObservableCollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1 'System\.Collections\.ObjectModel\.ObservableCollection\`1'), it will use the [System\.Collections\.ObjectModel\.ObservableCollection<>\.Move\(System\.Int32,System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ObservableCollection-1.Move#System_Collections_ObjectModel_ObservableCollection_1_Move_System_Int32,System_Int32_ 'System\.Collections\.ObjectModel\.ObservableCollection\`1\.Move\(System\.Int32,System\.Int32\)') method; else it will do an [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)') and [System\.Collections\.Generic\.IList<>\.Insert\(System\.Int32,@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System\.Collections\.Generic\.IList\`1\.Insert\(System\.Int32,\`0\)')\. +- **[ISetExtensions](DefaultUnDo/ISetExtensions/index.md 'DefaultUnDo\.ISetExtensions')** `Class` Provides a method to wrap an [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') to an UnDo set linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[AsUnDo<T>\(this ISet<T>, IUnDoManager, Func<UnDoCollectionOperation,object>\)](DefaultUnDo/ISetExtensions/AsUnDo_T_(thisISet_T_,IUnDoManager,Func_UnDoCollectionOperation,object_).md 'DefaultUnDo\.ISetExtensions\.AsUnDo\\(this System\.Collections\.Generic\.ISet\, DefaultUnDo\.IUnDoManager, System\.Func\\)')** `Method` Wraps an [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') to an UnDo set linked to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. +- **[IUnDoManagerExtensions](DefaultUnDo/IUnDoManagerExtensions/index.md 'DefaultUnDo\.IUnDoManagerExtensions')** `Class` Provides methods to create [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command and add them to an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + - **[Do\(this IUnDoManager, Action, Action, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do(thisDefaultUnDo.IUnDoManager,System.Action,System.Action,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\(this DefaultUnDo\.IUnDoManager, System\.Action, System\.Action, object\)')** `Method` Does a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified doAction and undoAction\. + - **[Do<T>\(this IUnDoManager, Action<T>, T, T, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Action_T_,T,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Action\, T, T, object\)')** `Method` Sets a value as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[Do<T>\(this IUnDoManager, IList<T>, int, T, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IList_T_,int,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)')** `Method` Sets the element at the specified index on a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[Do<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](DefaultUnDo/IUnDoManagerExtensions/Do.md#DefaultUnDo.IUnDoManagerExtensions.Do_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.Do\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)')** `Method` Sets the element with the specified key on a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoAdd<T>\(this IUnDoManager, ICollection<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)')** `Method` Adds a value to a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoAdd<T>\(this IUnDoManager, ISet<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ISet_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ISet\, T, object\)')** `Method` Adds an item from a [System\.Collections\.Generic\.ISet<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1 'System\.Collections\.Generic\.ISet\`1') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoAdd<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, TValue, object\)](DefaultUnDo/IUnDoManagerExtensions/DoAdd.md#DefaultUnDo.IUnDoManagerExtensions.DoAdd_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,TValue,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoAdd\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, TValue, object\)')** `Method` Adds a value to a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoClear<T>\(this IUnDoManager, ICollection<T>, object\)](DefaultUnDo/IUnDoManagerExtensions/DoClear_T_(thisIUnDoManager,ICollection_T_,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoClear\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, object\)')** `Method` Clears a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoInsert<T>\(this IUnDoManager, IList<T>, int, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoInsert_T_(thisIUnDoManager,IList_T_,int,T,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoInsert\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, T, object\)')** `Method` Inserts an item to a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoOnDo\(this IUnDoManager, Action, object\)](DefaultUnDo/IUnDoManagerExtensions/DoOnDo(thisIUnDoManager,Action,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnDo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)')** `Method` Does a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no undo\. + - **[DoOnUndo\(this IUnDoManager, Action, object\)](DefaultUnDo/IUnDoManagerExtensions/DoOnUndo(thisIUnDoManager,Action,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoOnUndo\(this DefaultUnDo\.IUnDoManager, System\.Action, object\)')** `Method` Does a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on the manager with the specified action with no do\. + - **[DoRemove<T>\(this IUnDoManager, ICollection<T>, T, object\)](DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_T_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.ICollection_T_,T,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.ICollection\, T, object\)')** `Method` Removes an item from a [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoRemove<TKey,TValue>\(this IUnDoManager, IDictionary<TKey,TValue>, TKey, object\)](DefaultUnDo/IUnDoManagerExtensions/DoRemove.md#DefaultUnDo.IUnDoManagerExtensions.DoRemove_TKey,TValue_(thisDefaultUnDo.IUnDoManager,System.Collections.Generic.IDictionary_TKey,TValue_,TKey,object) 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemove\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IDictionary\, TKey, object\)')** `Method` Removes the item with the specified key from a [System\.Collections\.Generic\.IDictionary<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2 'System\.Collections\.Generic\.IDictionary\`2') as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[DoRemoveAt<T>\(this IUnDoManager, IList<T>, int, object\)](DefaultUnDo/IUnDoManagerExtensions/DoRemoveAt_T_(thisIUnDoManager,IList_T_,int,object).md 'DefaultUnDo\.IUnDoManagerExtensions\.DoRemoveAt\\(this DefaultUnDo\.IUnDoManager, System\.Collections\.Generic\.IList\, int, object\)')** `Method` Removes an item from a [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') at the specified index as a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. +- **[ListUnDo<T>](DefaultUnDo/ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for [System\.Collections\.Generic\.IList<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System\.Collections\.Generic\.IList\`1') operation\. + - **[ListUnDo\(object, IList<T>, int, T, bool\)](DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(object,System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(object, System\.Collections\.Generic\.IList\, int, T, bool\)')** `Constructor` Initialises an instance of [ListUnDo<T>](DefaultUnDo/ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\')\. + - **[ListUnDo\(IList<T>, int, T, bool\)](DefaultUnDo/ListUnDo_T_/ListUnDo_T_.md#DefaultUnDo.ListUnDo_T_.ListUnDo(System.Collections.Generic.IList_T_,int,T,bool) 'DefaultUnDo\.ListUnDo\\.ListUnDo\(System\.Collections\.Generic\.IList\, int, T, bool\)')** `Constructor` Initialises an instance of [ListUnDo<T>](DefaultUnDo/ListUnDo_T_/index.md 'DefaultUnDo\.ListUnDo\')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/ListUnDo_T_/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.ListUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[UnDo](DefaultUnDo/UnDo/index.md 'DefaultUnDo\.UnDo')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for custom do and undo action\. + - **[UnDo\(object, Action, Action\)](DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(object,System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(object, System\.Action, System\.Action\)')** `Constructor` Initialises an instance of [UnDo](DefaultUnDo/UnDo/index.md 'DefaultUnDo\.UnDo')\. + - **[UnDo\(Action, Action\)](DefaultUnDo/UnDo/UnDo.md#DefaultUnDo.UnDo.UnDo(System.Action,System.Action) 'DefaultUnDo\.UnDo\.UnDo\(System\.Action, System\.Action\)')** `Constructor` Initialises an instance of [UnDo](DefaultUnDo/UnDo/index.md 'DefaultUnDo\.UnDo')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/UnDo/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.UnDo\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')** `Class` Provides a simple wrapper for a field to automatically generate [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[UnDoField\(IUnDoManager, Func<UnDoFieldChange<T>,object>\)](DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, System\.Func\,object\>\)')** `Constructor` Creates a new instance of [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + - **[UnDoField\(IUnDoManager, T, Func<UnDoFieldChange<T>,object>\)](DefaultUnDo/UnDoField_T_/UnDoField_T_.md#DefaultUnDo.UnDoField_T_.UnDoField(DefaultUnDo.IUnDoManager,T,System.Func_DefaultUnDo.UnDoFieldChange_T_,object_) 'DefaultUnDo\.UnDoField\\.UnDoField\(DefaultUnDo\.IUnDoManager, T, System\.Func\,object\>\)')** `Constructor` Creates a new instance of [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + - **[Value](DefaultUnDo/UnDoField_T_/Value.md 'DefaultUnDo\.UnDoField\\.Value')** `Property` Gets or sets the value of the field, generating a [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation on set\. + - **[PostSet\(T\)](DefaultUnDo/UnDoField_T_/PostSet(T).md 'DefaultUnDo\.UnDoField\\.PostSet\(T\)')** `Method` performs a post set treatment, included in the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[PreSet\(T\)](DefaultUnDo/UnDoField_T_/PreSet(T).md 'DefaultUnDo\.UnDoField\\.PreSet\(T\)')** `Method` Performs a pre set treatment, included in the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operation\. + - **[implicit operator T\(UnDoField<T>\)](DefaultUnDo/UnDoField_T_/implicitoperatorT(UnDoField_T_).md 'DefaultUnDo\.UnDoField\\.op\_Implicit T\(DefaultUnDo\.UnDoField\\)')** `Operator` Defines an implicit conversion of a [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\') to a T\. +- **[UnDoManager](DefaultUnDo/UnDoManager/index.md 'DefaultUnDo\.UnDoManager')** `Class` Provides an implementation of the command pattern to execute operations and return to a previous state by undoing them\. + - **[UnDoManager\(\)](DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager() 'DefaultUnDo\.UnDoManager\.UnDoManager\(\)')** `Constructor` Initialises an instance of [UnDoManager](DefaultUnDo/UnDoManager/index.md 'DefaultUnDo\.UnDoManager')\. + - **[UnDoManager\(int\)](DefaultUnDo/UnDoManager/UnDoManager.md#DefaultUnDo.UnDoManager.UnDoManager(int) 'DefaultUnDo\.UnDoManager\.UnDoManager\(int\)')** `Constructor` Initialises an instance of [UnDoManager](DefaultUnDo/UnDoManager/index.md 'DefaultUnDo\.UnDoManager')\. + - **[CanRedo](DefaultUnDo/UnDoManager/CanRedo.md 'DefaultUnDo\.UnDoManager\.CanRedo')** `Property` Returns a boolean to express if the method [Redo\(\)](DefaultUnDo/UnDoManager/Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)') can be executed\. + - **[CanUndo](DefaultUnDo/UnDoManager/CanUndo.md 'DefaultUnDo\.UnDoManager\.CanUndo')** `Property` Returns a boolean to express if the method [Undo\(\)](DefaultUnDo/UnDoManager/Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)') can be executed\. + - **[RedoDescriptions](DefaultUnDo/UnDoManager/RedoDescriptions.md 'DefaultUnDo\.UnDoManager\.RedoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. + - **[UndoDescriptions](DefaultUnDo/UnDoManager/UndoDescriptions.md 'DefaultUnDo\.UnDoManager\.UndoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. + - **[Version](DefaultUnDo/UnDoManager/Version.md 'DefaultUnDo\.UnDoManager\.Version')** `Property` Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + - **[BeginTransaction\(object\)](DefaultUnDo/UnDoManager/BeginTransaction(object).md 'DefaultUnDo\.UnDoManager\.BeginTransaction\(object\)')** `Method` Starts a group of operation and return an [IUnDoTransaction](DefaultUnDo/IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. If [Commit\(\)](DefaultUnDo/IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. + - **[Clear\(\)](DefaultUnDo/UnDoManager/Clear().md 'DefaultUnDo\.UnDoManager\.Clear\(\)')** `Method` Clears the history of [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[Do\(IUnDo\)](DefaultUnDo/UnDoManager/Do(IUnDo).md 'DefaultUnDo\.UnDoManager\.Do\(DefaultUnDo\.IUnDo\)')** `Method` Executes the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. + - **[Redo\(\)](DefaultUnDo/UnDoManager/Redo().md 'DefaultUnDo\.UnDoManager\.Redo\(\)')** `Method` Redoes the last undone [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + - **[Undo\(\)](DefaultUnDo/UnDoManager/Undo().md 'DefaultUnDo\.UnDoManager\.Undo\(\)')** `Method` Undoes the last executed [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + - **[PropertyChanged](DefaultUnDo/UnDoManager/PropertyChanged.md 'DefaultUnDo\.UnDoManager\.PropertyChanged')** `Event` Occurs when a property value changes\. +- **[ValueUnDo](DefaultUnDo/ValueUnDo/index.md 'DefaultUnDo\.ValueUnDo')** `Class` Provides a global [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') to use as default merge interval for all [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. + - **[MergeDescriptionAction](DefaultUnDo/ValueUnDo/MergeDescriptionAction.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler\(object, object\)](DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler\(object, object\)') used to merge description between two [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instance\. + - **[MergeInterval](DefaultUnDo/ValueUnDo/MergeInterval.md 'DefaultUnDo\.ValueUnDo\.MergeInterval')** `Property` The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. Default value is 500ms\. +- **[ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')** `Class` Provides an implementation of the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') interface for setting value\. + - **[ValueUnDo\(object, Action<T>, T, T\)](DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(object,System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(object, System\.Action\, T, T\)')** `Constructor` Initialises an instance of [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. + - **[ValueUnDo\(Action<T>, T, T\)](DefaultUnDo/ValueUnDo_T_/ValueUnDo_T_.md#DefaultUnDo.ValueUnDo_T_.ValueUnDo(System.Action_T_,T,T) 'DefaultUnDo\.ValueUnDo\\.ValueUnDo\(System\.Action\, T, T\)')** `Constructor` Initialises an instance of [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\')\. + - **[MergeDescriptionAction](DefaultUnDo/ValueUnDo_T_/MergeDescriptionAction.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionAction')** `Property` The [MergeDescriptionHandler\(object, T, object, T\)](DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)') used to merge description between two [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instance\. + - **[MergeInterval](DefaultUnDo/ValueUnDo_T_/MergeInterval.md 'DefaultUnDo\.ValueUnDo\\.MergeInterval')** `Property` The [System\.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System\.TimeSpan') interval equivalent [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances should respect to be mergeable\. If not set, [MergeInterval](DefaultUnDo/ValueUnDo/MergeInterval.md 'DefaultUnDo\.ValueUnDo\.MergeInterval') will be used\. + - **[DefaultUnDo\.IMergeableUnDo\.TryMerge\(IUnDo, IUnDo\)](DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IMergeableUnDo.TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)')** `Explicit Interface Implementation` Merges the current instance with the specified [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo')\. + - **[DefaultUnDo\.IUnDo\.Description](DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Description.md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Description')** `Explicit Interface Implementation` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[DefaultUnDo\.IUnDo\.Do\(\)](DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Do().md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Do\(\)')** `Explicit Interface Implementation` Does an action\. + - **[DefaultUnDo\.IUnDo\.Undo\(\)](DefaultUnDo/ValueUnDo_T_/DefaultUnDo.IUnDo.Undo().md 'DefaultUnDo\.ValueUnDo\\.DefaultUnDo\.IUnDo\.Undo\(\)')** `Explicit Interface Implementation` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[UnDoCollectionOperation](DefaultUnDo/UnDoCollectionOperation/index.md 'DefaultUnDo\.UnDoCollectionOperation')** `Struct` Provides data for the operation about to be performed on an undo collection\. + - **[UnDoCollectionOperation\(object, UnDoCollectionAction, object\[\]\)](DefaultUnDo/UnDoCollectionOperation/UnDoCollectionOperation(object,UnDoCollectionAction,object[]).md 'DefaultUnDo\.UnDoCollectionOperation\.UnDoCollectionOperation\(object, DefaultUnDo\.UnDoCollectionAction, object\[\]\)')** `Constructor` Provides data for the operation about to be performed on an undo collection\. + - **[Action](DefaultUnDo/UnDoCollectionOperation/Action.md 'DefaultUnDo\.UnDoCollectionOperation\.Action')** `Property` The action performed\. + - **[Collection](DefaultUnDo/UnDoCollectionOperation/Collection.md 'DefaultUnDo\.UnDoCollectionOperation\.Collection')** `Property` The collection on which the action is performed\. + - **[Parameters](DefaultUnDo/UnDoCollectionOperation/Parameters.md 'DefaultUnDo\.UnDoCollectionOperation\.Parameters')** `Property` The parameters of the action performed\. +- **[UnDoFieldChange<T>](DefaultUnDo/UnDoFieldChange_T_/index.md 'DefaultUnDo\.UnDoFieldChange\')** `Struct` Describes a value change operation done on a [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + - **[UnDoFieldChange\(T, T\)](DefaultUnDo/UnDoFieldChange_T_/UnDoFieldChange(T,T).md 'DefaultUnDo\.UnDoFieldChange\\.UnDoFieldChange\(T, T\)')** `Constructor` Describes a value change operation done on a [UnDoField<T>](DefaultUnDo/UnDoField_T_/index.md 'DefaultUnDo\.UnDoField\')\. + - **[NewValue](DefaultUnDo/UnDoFieldChange_T_/NewValue.md 'DefaultUnDo\.UnDoFieldChange\\.NewValue')** `Property` The field new value\. + - **[OldValue](DefaultUnDo/UnDoFieldChange_T_/OldValue.md 'DefaultUnDo\.UnDoFieldChange\\.OldValue')** `Property` The field old value\. +- **[IMergeableUnDo](DefaultUnDo/IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo')** `Interface` Provides a method to try to merge two [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') instances into a single one\. + - **[TryMerge\(IUnDo, IUnDo\)](DefaultUnDo/IMergeableUnDo/TryMerge(IUnDo,IUnDo).md 'DefaultUnDo\.IMergeableUnDo\.TryMerge\(DefaultUnDo\.IUnDo, DefaultUnDo\.IUnDo\)')** `Method` Merges the current instance with the specified [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo')\. +- **[IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo')** `Interface` Provides methods to execute an action and remove its effect\. + - **[Description](DefaultUnDo/IUnDo/Description.md 'DefaultUnDo\.IUnDo\.Description')** `Property` Gets a description of what this [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') perform\. + - **[Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)')** `Method` Does an action\. + - **[Undo\(\)](DefaultUnDo/IUnDo/Undo().md 'DefaultUnDo\.IUnDo\.Undo\(\)')** `Method` Does the opposite of the [Do\(\)](DefaultUnDo/IUnDo/Do().md 'DefaultUnDo\.IUnDo\.Do\(\)') action\. +- **[IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')** `Interface` Provides properties and methods of the command pattern to execute operations and return to a previous state by undoing them\. + - **[CanRedo](DefaultUnDo/IUnDoManager/CanRedo.md 'DefaultUnDo\.IUnDoManager\.CanRedo')** `Property` Returns a boolean to express if the method [Redo\(\)](DefaultUnDo/IUnDoManager/Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)') can be executed\. + - **[CanUndo](DefaultUnDo/IUnDoManager/CanUndo.md 'DefaultUnDo\.IUnDoManager\.CanUndo')** `Property` Returns a boolean to express if the method [Undo\(\)](DefaultUnDo/IUnDoManager/Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)') can be executed\. + - **[RedoDescriptions](DefaultUnDo/IUnDoManager/RedoDescriptions.md 'DefaultUnDo\.IUnDoManager\.RedoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be redone\. + - **[UndoDescriptions](DefaultUnDo/IUnDoManager/UndoDescriptions.md 'DefaultUnDo\.IUnDoManager\.UndoDescriptions')** `Property` Gets the descriptions in order of all the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') which can be undone\. + - **[Version](DefaultUnDo/IUnDoManager/Version.md 'DefaultUnDo\.IUnDoManager\.Version')** `Property` Gets an [System\.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System\.Int32') representing the state of the [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + - **[BeginTransaction\(object\)](DefaultUnDo/IUnDoManager/BeginTransaction(object).md 'DefaultUnDo\.IUnDoManager\.BeginTransaction\(object\)')** `Method` Starts a group of operation and return an [IUnDoTransaction](DefaultUnDo/IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction') to stop the group\. If [Commit\(\)](DefaultUnDo/IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)') is not called, all operations done during the transaction will be undone on [System\.IDisposable\.Dispose](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System\.IDisposable\.Dispose')\. + - **[Clear\(\)](DefaultUnDo/IUnDoManager/Clear().md 'DefaultUnDo\.IUnDoManager\.Clear\(\)')** `Method` Clears the history of [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') operations\. + - **[Do\(IUnDo\)](DefaultUnDo/IUnDoManager/Do(IUnDo).md 'DefaultUnDo\.IUnDoManager\.Do\(DefaultUnDo\.IUnDo\)')** `Method` Executes the [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command and stores it in the manager hostory\. + - **[Redo\(\)](DefaultUnDo/IUnDoManager/Redo().md 'DefaultUnDo\.IUnDoManager\.Redo\(\)')** `Method` Redoes the last undone [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. + - **[Undo\(\)](DefaultUnDo/IUnDoManager/Undo().md 'DefaultUnDo\.IUnDoManager\.Undo\(\)')** `Method` Undoes the last executed [IUnDo](DefaultUnDo/IUnDo/index.md 'DefaultUnDo\.IUnDo') command of the manager history\. +- **[IUnDoTransaction](DefaultUnDo/IUnDoTransaction/index.md 'DefaultUnDo\.IUnDoTransaction')** `Interface` Represents a transaction to record multiple undo operations as a single operation in the history of a [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + - **[Commit\(\)](DefaultUnDo/IUnDoTransaction/Commit().md 'DefaultUnDo\.IUnDoTransaction\.Commit\(\)')** `Method` Groups all recorded operations in a single [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and add it to the history of the [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager') instance this instance was created from\. If this method is not called before disposing current instance, all recorded operations will be undone\. +- **[UnDoCollectionAction](DefaultUnDo/UnDoCollectionAction/index.md 'DefaultUnDo\.UnDoCollectionAction')** `Enum` Describes the action that will be performed on an [System\.Collections\.Generic\.ICollection<>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1 'System\.Collections\.Generic\.ICollection\`1') and recorded by an [IUnDoManager](DefaultUnDo/IUnDoManager/index.md 'DefaultUnDo\.IUnDoManager')\. + - **[ICollectionAdd](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionAdd 'DefaultUnDo\.UnDoCollectionAction\.ICollectionAdd')** `Field` [System\.Collections\.Generic\.ICollection<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Add#System_Collections_Generic_ICollection_1_Add__0_ 'System\.Collections\.Generic\.ICollection\`1\.Add\(\`0\)') will be performed\. + - **[ICollectionClear](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionClear 'DefaultUnDo\.UnDoCollectionAction\.ICollectionClear')** `Field` [System\.Collections\.Generic\.ICollection<>\.Clear](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Clear 'System\.Collections\.Generic\.ICollection\`1\.Clear') will be performed\. + - **[ICollectionRemove](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ICollectionRemove 'DefaultUnDo\.UnDoCollectionAction\.ICollectionRemove')** `Field` [System\.Collections\.Generic\.ICollection<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ICollection-1.Remove#System_Collections_Generic_ICollection_1_Remove__0_ 'System\.Collections\.Generic\.ICollection\`1\.Remove\(\`0\)') will be performed\. + - **[IDictionaryAdd](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryAdd 'DefaultUnDo\.UnDoCollectionAction\.IDictionaryAdd')** `Field` [System\.Collections\.Generic\.IDictionary<>\.Add\(@0,@1\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Add#System_Collections_Generic_IDictionary_2_Add__0,_1_ 'System\.Collections\.Generic\.IDictionary\`2\.Add\(\`0,\`1\)') will be performed\. + - **[IDictionaryIndexer](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryIndexer 'DefaultUnDo\.UnDoCollectionAction\.IDictionaryIndexer')** `Field` [System\.Collections\.Generic\.IDictionary<>\.Item\(@@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Item#System_Collections_Generic_IDictionary_2_Item___0_ 'System\.Collections\.Generic\.IDictionary\`2\.Item\(\`\`0\)') will be performed\. + - **[IDictionaryRemove](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IDictionaryRemove 'DefaultUnDo\.UnDoCollectionAction\.IDictionaryRemove')** `Field` [System\.Collections\.Generic\.IDictionary<>\.Remove\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IDictionary-2.Remove#System_Collections_Generic_IDictionary_2_Remove__0_ 'System\.Collections\.Generic\.IDictionary\`2\.Remove\(\`0\)') will be performed\. + - **[IListIndexer](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListIndexer 'DefaultUnDo\.UnDoCollectionAction\.IListIndexer')** `Field` [System\.Collections\.Generic\.IList<>\.Item\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Item#System_Collections_Generic_IList_1_Item_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.Item\(System\.Int32\)') will be performed\. + - **[IListInsert](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListInsert 'DefaultUnDo\.UnDoCollectionAction\.IListInsert')** `Field` [System\.Collections\.Generic\.IList<>\.Insert\(System\.Int32,@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.Insert#System_Collections_Generic_IList_1_Insert_System_Int32,_0_ 'System\.Collections\.Generic\.IList\`1\.Insert\(System\.Int32,\`0\)') will be performed\. + - **[IListMove](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListMove 'DefaultUnDo\.UnDoCollectionAction\.IListMove')** `Field` [Move<T>\(this IList<T>, int, int\)](DefaultUnDo/IListExtensions/Move_T_(thisIList_T_,int,int).md 'DefaultUnDo\.IListExtensions\.Move\\(this System\.Collections\.Generic\.IList\, int, int\)') will be performed\. + - **[IListRemoveAt](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.IListRemoveAt 'DefaultUnDo\.UnDoCollectionAction\.IListRemoveAt')** `Field` [System\.Collections\.Generic\.IList<>\.RemoveAt\(System\.Int32\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1.RemoveAt#System_Collections_Generic_IList_1_RemoveAt_System_Int32_ 'System\.Collections\.Generic\.IList\`1\.RemoveAt\(System\.Int32\)') will be performed\. + - **[ISetAdd](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetAdd 'DefaultUnDo\.UnDoCollectionAction\.ISetAdd')** `Field` [System\.Collections\.Generic\.ISet<>\.Add\(@0\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.Add#System_Collections_Generic_ISet_1_Add__0_ 'System\.Collections\.Generic\.ISet\`1\.Add\(\`0\)') will be performed\. + - **[ISetExceptWith](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetExceptWith 'DefaultUnDo\.UnDoCollectionAction\.ISetExceptWith')** `Field` [System\.Collections\.Generic\.ISet<>\.ExceptWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.ExceptWith#System_Collections_Generic_ISet_1_ExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.ExceptWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + - **[ISetIntersectWith](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetIntersectWith 'DefaultUnDo\.UnDoCollectionAction\.ISetIntersectWith')** `Field` [System\.Collections\.Generic\.ISet<>\.IntersectWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.IntersectWith#System_Collections_Generic_ISet_1_IntersectWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.IntersectWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + - **[ISetSymmetricExceptWith](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetSymmetricExceptWith 'DefaultUnDo\.UnDoCollectionAction\.ISetSymmetricExceptWith')** `Field` [System\.Collections\.Generic\.ISet<>\.SymmetricExceptWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.SymmetricExceptWith#System_Collections_Generic_ISet_1_SymmetricExceptWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.SymmetricExceptWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. + - **[ISetUnionWith](DefaultUnDo/UnDoCollectionAction/index.md#DefaultUnDo.UnDoCollectionAction.ISetUnionWith 'DefaultUnDo\.UnDoCollectionAction\.ISetUnionWith')** `Field` [System\.Collections\.Generic\.ISet<>\.UnionWith\(System\.Collections\.Generic\.IEnumerable\{@0\}\)](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.ISet-1.UnionWith#System_Collections_Generic_ISet_1_UnionWith_System_Collections_Generic_IEnumerable{_0}_ 'System\.Collections\.Generic\.ISet\`1\.UnionWith\(System\.Collections\.Generic\.IEnumerable\{\`0\}\)') will be performed\. +- **[GroupUnDo\.MergeDescriptionHandler\(object, object, object\)](DefaultUnDo/GroupUnDo/MergeDescriptionHandler(object,object,object)/index.md 'DefaultUnDo\.GroupUnDo\.MergeDescriptionHandler\(object, object, object\)')** `Delegate` Represents a method that will be called when merging a [GroupUnDo](DefaultUnDo/GroupUnDo/index.md 'DefaultUnDo\.GroupUnDo') and a [IMergeableUnDo](DefaultUnDo/IMergeableUnDo/index.md 'DefaultUnDo\.IMergeableUnDo') instances to get the resulting description\. +- **[ValueUnDo\.MergeDescriptionHandler\(object, object\)](DefaultUnDo/ValueUnDo/MergeDescriptionHandler(object,object)/index.md 'DefaultUnDo\.ValueUnDo\.MergeDescriptionHandler\(object, object\)')** `Delegate` Represents a method that will be called when merging two [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances to get the resulting description\. +- **[ValueUnDo<T>\.MergeDescriptionHandler\(object, T, object, T\)](DefaultUnDo/ValueUnDo_T_/MergeDescriptionHandler(object,T,object,T)/index.md 'DefaultUnDo\.ValueUnDo\\.MergeDescriptionHandler\(object, T, object, T\)')** `Delegate` Represents a method that will be called when merging two [ValueUnDo<T>](DefaultUnDo/ValueUnDo_T_/index.md 'DefaultUnDo\.ValueUnDo\') instances to get the resulting description\. + +--- +Generated by [DefaultDocumentation](https://github.com/Doraku/DefaultDocumentation 'https://github\.com/Doraku/DefaultDocumentation') \ No newline at end of file diff --git a/source/DefaultUnDo.Test/CollectionUndoTest.cs b/source/DefaultUnDo.Test/CollectionUndoTest.cs deleted file mode 100644 index 3bf5539..0000000 --- a/source/DefaultUnDo.Test/CollectionUndoTest.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class CollectionUndoTest -{ - [Fact] - public void CollectionUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - Check - .ThatCode(() => new CollectionUnDo(null, 0, false)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void Do_Should_add_element_to_source_When_isAdd_is_true() - { - object value = new(); - ICollection source = Substitute.For>(); - IUnDo undo = new CollectionUnDo(source, value, true); - - bool done = false; - - source.When(s => s.Add(value)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Do_Should_remove_element_from_source_When_isAdd_is_false() - { - object value = new(); - ICollection source = Substitute.For>(); - IUnDo undo = new CollectionUnDo(source, value, false); - - bool done = false; - - source.When(s => s.Remove(value)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_remove_element_from_source_When_isAdd_is_true() - { - object value = new(); - ICollection source = Substitute.For>(); - IUnDo undo = new CollectionUnDo(source, value, true); - - bool done = false; - - source.When(s => s.Remove(value)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_add_element_to_source_When_isAdd_is_false() - { - object value = new(); - ICollection source = Substitute.For>(); - IUnDo undo = new CollectionUnDo(source, value, false); - - bool done = false; - - source.When(s => s.Add(value)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Description_Should_return_description() - { - IUnDo undo = new CollectionUnDo("test", Substitute.For>(), null, true); - - Check.That(undo.Description).IsEqualTo("test"); - } -} diff --git a/source/DefaultUnDo.Test/CollectionUndoTests/ConstructorShould.cs b/source/DefaultUnDo.Test/CollectionUndoTests/ConstructorShould.cs new file mode 100644 index 0000000..a1b25e1 --- /dev/null +++ b/source/DefaultUnDo.Test/CollectionUndoTests/ConstructorShould.cs @@ -0,0 +1,17 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.CollectionUndoTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + Check + .ThatCode(() => new CollectionUnDo(null, 0, false)) + .Throws() + .WithProperty("ParamName", "source"); + } +} diff --git a/source/DefaultUnDo.Test/CollectionUndoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/CollectionUndoTests/DescriptionShould.cs new file mode 100644 index 0000000..ea63aef --- /dev/null +++ b/source/DefaultUnDo.Test/CollectionUndoTests/DescriptionShould.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.CollectionUndoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + IUnDo undo = new CollectionUnDo("test", Substitute.For>(), null, true); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/CollectionUndoTests/DoShould.cs b/source/DefaultUnDo.Test/CollectionUndoTests/DoShould.cs new file mode 100644 index 0000000..68ead78 --- /dev/null +++ b/source/DefaultUnDo.Test/CollectionUndoTests/DoShould.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.CollectionUndoTests; + +public sealed class DoShould +{ + [Fact] + public void AddElementToSourceWhenIsAddIsTrue() + { + object value = new(); + ICollection source = Substitute.For>(); + IUnDo undo = new CollectionUnDo(source, value, true); + + bool done = false; + + source.When(s => s.Add(value)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void RemoveElementFromSourceWhenIsAddIsFalse() + { + object value = new(); + ICollection source = Substitute.For>(); + IUnDo undo = new CollectionUnDo(source, value, false); + + bool done = false; + + source.When(s => s.Remove(value)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/CollectionUndoTests/UndoShould.cs b/source/DefaultUnDo.Test/CollectionUndoTests/UndoShould.cs new file mode 100644 index 0000000..773b2da --- /dev/null +++ b/source/DefaultUnDo.Test/CollectionUndoTests/UndoShould.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.CollectionUndoTests; + +public sealed class UndoShould +{ + [Fact] + public void RemoveElementFromSourceWhenIsAddIsTrue() + { + object value = new(); + ICollection source = Substitute.For>(); + IUnDo undo = new CollectionUnDo(source, value, true); + + bool done = false; + + source.When(s => s.Remove(value)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void AddElementToSourceWhenIsAddIsFalse() + { + object value = new(); + ICollection source = Substitute.For>(); + IUnDo undo = new CollectionUnDo(source, value, false); + + bool done = false; + + source.When(s => s.Add(value)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/DictionaryUnDoTest.cs b/source/DefaultUnDo.Test/DictionaryUnDoTest.cs deleted file mode 100644 index 93171af..0000000 --- a/source/DefaultUnDo.Test/DictionaryUnDoTest.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class DictionaryUnDoTest -{ - [Fact] - public void DictionaryUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - Check - .ThatCode(() => new DictionaryUnDo(null, new object(), 0, false)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DictionaryUnDo_Should_throw_ArgumentNullException_When_key_is_null() - { - IDictionary source = Substitute.For>(); - - Check - .ThatCode(() => new DictionaryUnDo(source, null, 0, false)) - .Throws() - .WithProperty("ParamName", "key"); - } - - [Fact] - public void Do_Should_add_element_to_source_When_isAdd_is_true() - { - object key = new(); - object value = new(); - IDictionary source = Substitute.For>(); - IUnDo undo = new DictionaryUnDo(source, key, value, true); - - bool done = false; - - source.When(s => s.Add(key, value)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Do_Should_remove_element_from_source_When_isAdd_is_false() - { - object key = new(); - object value = new(); - IDictionary source = Substitute.For>(); - IUnDo undo = new DictionaryUnDo(source, key, value, false); - - bool done = false; - - source.When(s => s.Remove(key)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_remove_element_from_source_When_isAdd_is_true() - { - object key = new(); - object value = new(); - IDictionary source = Substitute.For>(); - IUnDo undo = new DictionaryUnDo(source, key, value, true); - - bool done = false; - - source.When(s => s.Remove(key)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_add_element_to_source_When_isAdd_is_false() - { - object key = new(); - object value = new(); - IDictionary source = Substitute.For>(); - IUnDo undo = new DictionaryUnDo(source, key, value, false); - - bool done = false; - - source.When(s => s.Add(key, value)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Description_Should_return_description() - { - object key = new(); - IUnDo undo = new DictionaryUnDo("test", Substitute.For>(), key, null, true); - - Check.That(undo.Description).IsEqualTo("test"); - } -} diff --git a/source/DefaultUnDo.Test/DictionaryUnDoTests/ConstructorShould.cs b/source/DefaultUnDo.Test/DictionaryUnDoTests/ConstructorShould.cs new file mode 100644 index 0000000..8c7720f --- /dev/null +++ b/source/DefaultUnDo.Test/DictionaryUnDoTests/ConstructorShould.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.DictionaryUnDoTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + Check + .ThatCode(() => new DictionaryUnDo(null, new object(), 0, false)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenKeyIsNull() + { + IDictionary source = Substitute.For>(); + + Check + .ThatCode(() => new DictionaryUnDo(source, null, 0, false)) + .Throws() + .WithProperty("ParamName", "key"); + } +} diff --git a/source/DefaultUnDo.Test/DictionaryUnDoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/DictionaryUnDoTests/DescriptionShould.cs new file mode 100644 index 0000000..d5b7fb7 --- /dev/null +++ b/source/DefaultUnDo.Test/DictionaryUnDoTests/DescriptionShould.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.DictionaryUnDoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + object key = new(); + IUnDo undo = new DictionaryUnDo("test", Substitute.For>(), key, null, true); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/DictionaryUnDoTests/DoShould.cs b/source/DefaultUnDo.Test/DictionaryUnDoTests/DoShould.cs new file mode 100644 index 0000000..08fa1c9 --- /dev/null +++ b/source/DefaultUnDo.Test/DictionaryUnDoTests/DoShould.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.DictionaryUnDoTests; + +public sealed class DoShould +{ + [Fact] + public void AddElementToSourceWhenIsAddIsTrue() + { + object key = new(); + object value = new(); + IDictionary source = Substitute.For>(); + IUnDo undo = new DictionaryUnDo(source, key, value, true); + + bool done = false; + + source.When(s => s.Add(key, value)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void RemoveElementFromSourceWhenIsAddIsFalse() + { + object key = new(); + object value = new(); + IDictionary source = Substitute.For>(); + IUnDo undo = new DictionaryUnDo(source, key, value, false); + + bool done = false; + + source.When(s => s.Remove(key)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/DictionaryUnDoTests/UndoShould.cs b/source/DefaultUnDo.Test/DictionaryUnDoTests/UndoShould.cs new file mode 100644 index 0000000..b38f84f --- /dev/null +++ b/source/DefaultUnDo.Test/DictionaryUnDoTests/UndoShould.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.DictionaryUnDoTests; + +public sealed class UndoShould +{ + [Fact] + public void RemoveElementFromSourceWhenIsAddIsTrue() + { + object key = new(); + object value = new(); + IDictionary source = Substitute.For>(); + IUnDo undo = new DictionaryUnDo(source, key, value, true); + + bool done = false; + + source.When(s => s.Remove(key)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void AddElementToSourceWhenIsAddIsFalse() + { + object key = new(); + object value = new(); + IDictionary source = Substitute.For>(); + IUnDo undo = new DictionaryUnDo(source, key, value, false); + + bool done = false; + + source.When(s => s.Add(key, value)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/ICollectionExtensionsTests/AsUndoShould.cs b/source/DefaultUnDo.Test/Extensions/ICollectionExtensionsTests/AsUndoShould.cs new file mode 100644 index 0000000..e20dce3 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/ICollectionExtensionsTests/AsUndoShould.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.ICollectionExtensionsTests; + +public sealed class AsUndoShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + ICollection source = null; + + Check + .ThatCode(() => source.AsUnDo(Substitute.For())) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + ICollection source = Substitute.For>(); + + Check + .ThatCode(() => source.AsUnDo(null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ReturnAnICollection() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + Check.That(source.AsUnDo(manager)).IsNotNull(); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IDictionaryExtensionsTests/AsUndoShould.cs b/source/DefaultUnDo.Test/Extensions/IDictionaryExtensionsTests/AsUndoShould.cs new file mode 100644 index 0000000..332c7f1 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IDictionaryExtensionsTests/AsUndoShould.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.IDictionaryExtensionsTests; + +public sealed class AsUndoShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + IDictionary source = null; + + Check + .ThatCode(() => source.AsUnDo(Substitute.For())) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + IDictionary source = Substitute.For>(); + + Check + .ThatCode(() => source.AsUnDo(null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ReturnAnIDictionary() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + Check.That(source.AsUnDo(manager)).IsNotNull(); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IListExtensionsTests/AsUnDoShould.cs b/source/DefaultUnDo.Test/Extensions/IListExtensionsTests/AsUnDoShould.cs new file mode 100644 index 0000000..dd83924 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IListExtensionsTests/AsUnDoShould.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.IListExtensionsTests; + +public sealed class IListExtensionTest +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + IList source = null; + + Check + .ThatCode(() => source.AsUnDo(Substitute.For())) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + IList source = Substitute.For>(); + + Check + .ThatCode(() => source.AsUnDo(null)) + .Throws() + .WithProperty("ParamName", "manager"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/ISetExtensionsTests/AsUnDoShould.cs b/source/DefaultUnDo.Test/Extensions/ISetExtensionsTests/AsUnDoShould.cs new file mode 100644 index 0000000..aef9473 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/ISetExtensionsTests/AsUnDoShould.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.ISetExtensionsTests; + +public sealed class AsUnDoShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + ISet source = null; + + Check + .ThatCode(() => source.AsUnDo(Substitute.For())) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + ISet source = Substitute.For>(); + + Check + .ThatCode(() => source.AsUnDo(null)) + .Throws() + .WithProperty("ParamName", "manager"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoAddShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoAddShould.cs new file mode 100644 index 0000000..920b040 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoAddShould.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoAddShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForISet() + { + IUnDoManager manager = null; + ISet source = null; + + Check + .ThatCode(() => manager.DoAdd(source, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForISet() + { + IUnDoManager manager = Substitute.For(); + ISet source = null; + + Check + .ThatCode(() => manager.DoAdd(source, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForICollection() + { + IUnDoManager manager = null; + ICollection source = null; + + Check + .ThatCode(() => manager.DoAdd(source, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForICollection() + { + IUnDoManager manager = Substitute.For(); + ICollection source = null; + + Check + .ThatCode(() => manager.DoAdd(source, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void KeepIndexWhenSourceIsIList() + { + IUnDoManager manager = new UnDoManager(); + ICollection source = [0, 1]; + + manager.DoAdd(source, 2); + + source.Add(3); + + manager.Undo(); + + Check.That(source).ContainsExactly(0, 1, 3); + + manager.Redo(); + + Check.That(source).ContainsExactly(0, 1, 2, 3); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForIDictionary() + { + IUnDoManager manager = null; + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.DoAdd(source, key, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForIDictionary() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.DoAdd(source, key, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenKeyIsNull() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = Substitute.For>(); + object key = null; + + Check + .ThatCode(() => manager.DoAdd(source, key, null)) + .Throws() + .WithProperty("ParamName", "key"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoClearShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoClearShould.cs new file mode 100644 index 0000000..076a750 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoClearShould.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoClearShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + IUnDoManager manager = null; + ICollection source = null; + + Check + .ThatCode(() => manager.DoClear(source)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + IUnDoManager manager = Substitute.For(); + ICollection source = null; + + Check + .ThatCode(() => manager.DoClear(source)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void AddOldElementsWhenUndone() + { + ICollection source = [ + new(), + new(), + new() + ]; + IUnDoManager manager = Substitute.For(); + IUnDo undo = null; + List sourceCopy = [.. source]; + + manager.Do(Arg.Do(i => undo = i)); + + manager.DoClear(source); + + Check.That(undo).IsNotNull(); + + undo.Do(); + + Check.That(source.Count).IsEqualTo(0); + + undo.Undo(); + + Check.That(source).ContainsExactly(sourceCopy); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoInsertShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoInsertShould.cs new file mode 100644 index 0000000..bf481e6 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoInsertShould.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoInsertShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + IUnDoManager manager = null; + IList source = null; + + Check + .ThatCode(() => manager.DoInsert(source, 0, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + IUnDoManager manager = Substitute.For(); + IList source = null; + + Check + .ThatCode(() => manager.DoInsert(source, 0, null)) + .Throws() + .WithProperty("ParamName", "source"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnDoShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnDoShould.cs new file mode 100644 index 0000000..bdfe55f --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnDoShould.cs @@ -0,0 +1,24 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoOnDoShould +{ + [Fact] + public void CallAction() + { + IUnDoManager manager = Substitute.For(); + IUnDo undo = null; + bool done = false; + + manager.Do(Arg.Do(i => undo = i)); + manager.DoOnDo(() => done = true); + + Check.That(undo).IsNotNull(); + undo.Do(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnUndoShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnUndoShould.cs new file mode 100644 index 0000000..73358f3 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoOnUndoShould.cs @@ -0,0 +1,24 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoOnUndoShould +{ + [Fact] + public void CallAction() + { + IUnDoManager manager = Substitute.For(); + IUnDo undo = null; + bool done = false; + + manager.Do(Arg.Do(i => undo = i)); + manager.DoOnUndo(() => done = true); + + Check.That(undo).IsNotNull(); + undo.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveAtShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveAtShould.cs new file mode 100644 index 0000000..5550d2f --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveAtShould.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoRemoveAtShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + IUnDoManager manager = null; + IList source = null; + + Check + .ThatCode(() => manager.DoRemoveAt(source, 0)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + IUnDoManager manager = Substitute.For(); + IList source = null; + + Check + .ThatCode(() => manager.DoRemoveAt(source, 0)) + .Throws() + .WithProperty("ParamName", "source"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveShould.cs new file mode 100644 index 0000000..7ae97d8 --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoRemoveShould.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoRemoveShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForICollection() + { + IUnDoManager manager = null; + ICollection source = null; + + Check + .ThatCode(() => manager.DoRemove(source, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForICollection() + { + IUnDoManager manager = Substitute.For(); + ICollection source = null; + + Check + .ThatCode(() => manager.DoRemove(source, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void KeepIndexWhenSourceIsIList() + { + IUnDoManager manager = new UnDoManager(); + ICollection source = [0, 1]; + + manager.DoRemove(source, 0); + + manager.Undo(); + + Check.That(source).ContainsExactly(0, 1); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForIDictionary() + { + IUnDoManager manager = null; + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.DoRemove(source, key)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForIDictionary() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.DoRemove(source, key)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenKeyIsNull() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = Substitute.For>(); + object key = null; + + Check + .ThatCode(() => manager.DoRemove(source, key)) + .Throws() + .WithProperty("ParamName", "key"); + } +} diff --git a/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoShould.cs b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoShould.cs new file mode 100644 index 0000000..76b857a --- /dev/null +++ b/source/DefaultUnDo.Test/Extensions/IUnDoManagerExtensionsTests/DoShould.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using Xunit; + +namespace DefaultUnDo.Extensions.IUnDoManagerExtensionsTests; + +public sealed class DoShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForIDictionary() + { + IUnDoManager manager = null; + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.Do(source, key, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForIDictionary() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = null; + object key = null; + + Check + .ThatCode(() => manager.Do(source, key, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenKeyIsNullForIDictionary() + { + IUnDoManager manager = Substitute.For(); + IDictionary source = Substitute.For>(); + object key = null; + + Check + .ThatCode(() => manager.Do(source, key, null)) + .Throws() + .WithProperty("ParamName", "key"); + } + + [Fact] + public void RemoveElementWhenUndoneForIDictionary() + { + object key = new(); + IDictionary source = new Dictionary(); + IUnDoManager manager = Substitute.For(); + IUnDo undo = null; + + manager.Do(Arg.Do(i => undo = i)); + + manager.Do(source, key, null); + + Check.That(undo).IsNotNull(); + + undo.Do(); + + Check.That(source.ContainsKey(key)).IsTrue(); + + undo.Undo(); + + Check.That(source.ContainsKey(key)).IsFalse(); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForIList() + { + IUnDoManager manager = null; + IList source = null; + + Check + .ThatCode(() => manager.Do(source, 0, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNullForIList() + { + IUnDoManager manager = Substitute.For(); + IList source = null; + + Check + .ThatCode(() => manager.Do(source, 0, null)) + .Throws() + .WithProperty("ParamName", "source"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForAction() + { + IUnDoManager manager = null; + Action doAction = null; + Action undoAction = null; + + Check + .ThatCode(() => manager.Do(doAction, undoAction)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void NotDoAnythingWhenBothActionsAreNullForAction() + { + IUnDoManager manager = new UnDoManager(); + Action doAction = null; + Action undoAction = null; + + manager.Do(doAction, undoAction); + + Check.That(manager.CanUndo).IsFalse(); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNullForSetter() + { + IUnDoManager manager = null; + Action setter = null; + + Check + .ThatCode(() => manager.Do(setter, null, null)) + .Throws() + .WithProperty("ParamName", "manager"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenSetterIsNullForSetter() + { + IUnDoManager manager = Substitute.For(); + Action setter = null; + + Check + .ThatCode(() => manager.Do(setter, null, null)) + .Throws() + .WithProperty("ParamName", "setter"); + } +} diff --git a/source/DefaultUnDo.Test/GroupUnDoTest.cs b/source/DefaultUnDo.Test/GroupUnDoTest.cs deleted file mode 100644 index 195fec5..0000000 --- a/source/DefaultUnDo.Test/GroupUnDoTest.cs +++ /dev/null @@ -1,191 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class GroupUnDoTest -{ - [Fact] - public void GroupUnDo_Should_throw_ArgumentNullException_When_commands_is_null() - { - Check - .ThatCode(() => new GroupUnDo(default)) - .Throws() - .WithProperty("ParamName", "commands"); - } - - [Fact] - public void GroupUnDo_Should_throw_ArgumentNullException_When_commands_empty() - { - Check - .ThatCode(() => new GroupUnDo()) - .Throws() - .WithProperty("ParamName", "commands"); - } - - [Fact] - public void GroupUnDo_Should_throw_ArgumentNullException_When_commands_contains_null() - { - Check - .ThatCode(() => new GroupUnDo([null])) - .Throws() - .WithProperty("ParamName", "commands"); - } - - [Fact] - public void Do_Should_execute_children_Do() - { - List done = []; - - IUnDo undo1 = Substitute.For(); - undo1.When(u => u.Do()).Do(_ => done.Add(undo1)); - - IUnDo undo2 = Substitute.For(); - undo2.When(u => u.Do()).Do(_ => done.Add(undo2)); - - IUnDo undo = new GroupUnDo( - undo1, - undo2); - - undo.Do(); - - Check.That(done).ContainsExactly(undo1, undo2); - } - - [Fact] - public void Undo_Should_execute_children_Undo_in_reverse() - { - List done = []; - - IUnDo undo1 = Substitute.For(); - undo1.When(u => u.Undo()).Do(_ => done.Add(undo1)); - - IUnDo undo2 = Substitute.For(); - undo2.When(u => u.Undo()).Do(_ => done.Add(undo2)); - - IUnDo undo = new GroupUnDo( - undo1, - undo2); - - undo.Undo(); - - Check.That(done).ContainsExactly(undo2, undo1); - } - - [Fact] - public void Description_Should_return_description() - { - IUnDo undo = new GroupUnDo("test", Substitute.For()); - - Check.That(undo.Description).IsEqualTo("test"); - } - - [Fact] - public void TryGetSingle_Should_return_false_When_multile_children() - { - GroupUnDo group = new( - Substitute.For(), - Substitute.For()); - - Check.That(group.TryGetSingle(out _)).IsFalse(); - } - - [Fact] - public void TryGetSingle_Should_return_false_When_single_child_is_not_T() - { - GroupUnDo group = new(Substitute.For()); - - Check.That(group.TryGetSingle(out _)).IsFalse(); - } - - [Fact] - public void TryGetSingle_Should_return_true_When_single_child_is_T() - { - IUnDo undo = Substitute.For(); - GroupUnDo group = new(undo); - - Check.That(group.TryGetSingle(out IUnDo found)).IsTrue(); - Check.That(found).IsEqualTo(undo); - } - - [Fact] - public void TryMerge_Should_return_false_When_group_is_not_single_IMergeableUnDo() - { - IMergeableUnDo group = new GroupUnDo("test", Substitute.For()); - IUnDo undo = Substitute.For(); - undo.Description.Returns("test"); - - Check.That(group.TryMerge(undo, out _)).IsFalse(); - } - - [Fact] - public void TryMerge_Should_return_false_When_single_IMergeableUnDo_do_not_merge() - { - IUnDo undo = Substitute.For(); - IMergeableUnDo group = new GroupUnDo("test", Substitute.For()); - undo.Description.Returns("test"); - - Check.That(group.TryMerge(undo, out _)).IsFalse(); - } - - [Fact] - public void TryMerge_Should_return_true_When_merged() - { - IMergeableUnDo mergeable = Substitute.For(); - IUnDo undo = Substitute.For(); - IMergeableUnDo group = new GroupUnDo("test", mergeable); - undo.Description.Returns("test"); - mergeable.TryMerge(undo, out Arg.Any()).Returns(x => - { - x[1] = undo; - return true; - }); - - Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); - Check.That(merged.Description).IsEqualTo(group.Description); - - IUnDo newUndo = null; - (merged as GroupUnDo)?.TryGetSingle(out newUndo); - - Check.That(newUndo).IsEqualTo(undo); - } - - [Fact] - public void TryMerge_Should_use_group_description() - { - IMergeableUnDo mergeable = Substitute.For(); - IUnDo undo = Substitute.For(); - IMergeableUnDo group = new GroupUnDo("test", mergeable); - undo.Description.Returns("test1"); - mergeable.TryMerge(undo, out Arg.Any()).Returns(x => - { - x[1] = undo; - return true; - }); - Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); - Check.That(merged.Description).IsEqualTo(group.Description); - } - - [Fact] - public void TryMerge_Should_use_MergeDescriptionAction_When_set() - { - IMergeableUnDo mergeable = Substitute.For(); - IUnDo undo = Substitute.For(); - IMergeableUnDo group = new GroupUnDo("test", mergeable); - undo.Description.Returns("test"); - mergeable.TryMerge(undo, out Arg.Any()).Returns(x => - { - x[1] = undo; - return true; - }); - GroupUnDo.MergeDescriptionAction = (_, _, _) => "kikoo"; - - Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); - Check.That(merged.Description).IsEqualTo("kikoo"); - - GroupUnDo.MergeDescriptionAction = null; - } -} diff --git a/source/DefaultUnDo.Test/GroupUnDoTests/ConstructorShould.cs b/source/DefaultUnDo.Test/GroupUnDoTests/ConstructorShould.cs new file mode 100644 index 0000000..280d570 --- /dev/null +++ b/source/DefaultUnDo.Test/GroupUnDoTests/ConstructorShould.cs @@ -0,0 +1,35 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.GroupUnDoTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenCommandsIsNull() + { + Check + .ThatCode(() => new GroupUnDo(default)) + .Throws() + .WithProperty("ParamName", "commands"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenCommandsEmpty() + { + Check + .ThatCode(() => new GroupUnDo()) + .Throws() + .WithProperty("ParamName", "commands"); + } + + [Fact] + public void ThrowArgumentNullExceptionWhenCommandsContainsNull() + { + Check + .ThatCode(() => new GroupUnDo([null])) + .Throws() + .WithProperty("ParamName", "commands"); + } +} diff --git a/source/DefaultUnDo.Test/GroupUnDoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/GroupUnDoTests/DescriptionShould.cs new file mode 100644 index 0000000..30d11fe --- /dev/null +++ b/source/DefaultUnDo.Test/GroupUnDoTests/DescriptionShould.cs @@ -0,0 +1,16 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.GroupUnDoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + IUnDo undo = new GroupUnDo("test", Substitute.For()); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/GroupUnDoTests/DoShould.cs b/source/DefaultUnDo.Test/GroupUnDoTests/DoShould.cs new file mode 100644 index 0000000..e3b802a --- /dev/null +++ b/source/DefaultUnDo.Test/GroupUnDoTests/DoShould.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.GroupUnDoTests; + +public sealed class DoShould +{ + [Fact] + public void ExecuteChildrenDo() + { + List done = []; + + IUnDo undo1 = Substitute.For(); + undo1.When(u => u.Do()).Do(_ => done.Add(undo1)); + + IUnDo undo2 = Substitute.For(); + undo2.When(u => u.Do()).Do(_ => done.Add(undo2)); + + IUnDo undo = new GroupUnDo( + undo1, + undo2); + + undo.Do(); + + Check.That(done).ContainsExactly(undo1, undo2); + } +} diff --git a/source/DefaultUnDo.Test/GroupUnDoTests/TryGetSingleShould.cs b/source/DefaultUnDo.Test/GroupUnDoTests/TryGetSingleShould.cs new file mode 100644 index 0000000..1dcf5cd --- /dev/null +++ b/source/DefaultUnDo.Test/GroupUnDoTests/TryGetSingleShould.cs @@ -0,0 +1,36 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.GroupUnDoTests; + +public sealed class TryGetSingleShould +{ + [Fact] + public void ReturnFalseWhenMultileChildren() + { + GroupUnDo group = new( + Substitute.For(), + Substitute.For()); + + Check.That(group.TryGetSingle(out _)).IsFalse(); + } + + [Fact] + public void ReturnFalseWhenSingleChildIsNotT() + { + GroupUnDo group = new(Substitute.For()); + + Check.That(group.TryGetSingle(out _)).IsFalse(); + } + + [Fact] + public void ReturnTrueWhenSingleChildIsT() + { + IUnDo undo = Substitute.For(); + GroupUnDo group = new(undo); + + Check.That(group.TryGetSingle(out IUnDo found)).IsTrue(); + Check.That(found).IsEqualTo(undo); + } +} diff --git a/source/DefaultUnDo.Test/GroupUnDoTests/TryMergeShould.cs b/source/DefaultUnDo.Test/GroupUnDoTests/TryMergeShould.cs new file mode 100644 index 0000000..d6fbd96 --- /dev/null +++ b/source/DefaultUnDo.Test/GroupUnDoTests/TryMergeShould.cs @@ -0,0 +1,86 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.GroupUnDoTests; + +public sealed class TryMergeShould +{ + [Fact] + public void ReturnFalseWhenGroupIsNotSingleIMergeableUnDo() + { + IMergeableUnDo group = new GroupUnDo("test", Substitute.For()); + IUnDo undo = Substitute.For(); + undo.Description.Returns("test"); + + Check.That(group.TryMerge(undo, out _)).IsFalse(); + } + + [Fact] + public void ReturnFalseWhenSingleIMergeableUnDoDoNotMerge() + { + IUnDo undo = Substitute.For(); + IMergeableUnDo group = new GroupUnDo("test", Substitute.For()); + undo.Description.Returns("test"); + + Check.That(group.TryMerge(undo, out _)).IsFalse(); + } + + [Fact] + public void ReturnTrueWhenMerged() + { + IMergeableUnDo mergeable = Substitute.For(); + IUnDo undo = Substitute.For(); + IMergeableUnDo group = new GroupUnDo("test", mergeable); + undo.Description.Returns("test"); + mergeable.TryMerge(undo, out Arg.Any()).Returns(x => + { + x[1] = undo; + return true; + }); + + Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); + Check.That(merged.Description).IsEqualTo(group.Description); + + IUnDo newUndo = null; + (merged as GroupUnDo)?.TryGetSingle(out newUndo); + + Check.That(newUndo).IsEqualTo(undo); + } + + [Fact] + public void UseGroupDescription() + { + IMergeableUnDo mergeable = Substitute.For(); + IUnDo undo = Substitute.For(); + IMergeableUnDo group = new GroupUnDo("test", mergeable); + undo.Description.Returns("test1"); + mergeable.TryMerge(undo, out Arg.Any()).Returns(x => + { + x[1] = undo; + return true; + }); + Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); + Check.That(merged.Description).IsEqualTo(group.Description); + } + + [Fact] + public void UseMergeDescriptionActionWhenSet() + { + IMergeableUnDo mergeable = Substitute.For(); + IUnDo undo = Substitute.For(); + IMergeableUnDo group = new GroupUnDo("test", mergeable); + undo.Description.Returns("test"); + mergeable.TryMerge(undo, out Arg.Any()).Returns(x => + { + x[1] = undo; + return true; + }); + GroupUnDo.MergeDescriptionAction = (_, _, _) => "kikoo"; + + Check.That(group.TryMerge(undo, out IUnDo merged)).IsTrue(); + Check.That(merged.Description).IsEqualTo("kikoo"); + + GroupUnDo.MergeDescriptionAction = null; + } +} diff --git a/source/DefaultUnDo.Test/ICollectionExtensionTest.cs b/source/DefaultUnDo.Test/ICollectionExtensionTest.cs deleted file mode 100644 index 23aa897..0000000 --- a/source/DefaultUnDo.Test/ICollectionExtensionTest.cs +++ /dev/null @@ -1,325 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class ICollectionExtensionTest -{ - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - ICollection source = null; - - Check - .ThatCode(() => source.AsUnDo(Substitute.For())) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_manager_is_null() - { - ICollection source = Substitute.For>(); - - Check - .ThatCode(() => source.AsUnDo(null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void AsUnDo_Should_return_an_ICollection() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - Check.That(source.AsUnDo(manager)).IsNotNull(); - } - - [Fact] - public void UnDoCollection_Add_Should_Add() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object value = new(); - - bool done = false; - - source.When(s => s.Add(value)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager); - - unDoCollection.Add(value); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_Add_Should_generate_Add_description() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager, d => description = d); - - object item = new(); - unDoCollection.Add(item); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionAdd); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(item); - } - - [Fact] - public void UnDoCollection_Clear_Should_Clear() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - bool done = false; - - source.Count.Returns(42); - source.When(s => s.Clear()).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager); - - unDoCollection.Clear(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_Clear_Should_generate_Clear_description() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager, d => description = d); - - unDoCollection.Clear(); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionClear); - Check.That(description.Value.Parameters.Length).IsZero(); - } - - [Fact] - public void UnDoCollection_Contains_Should_return_Contains() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object value = new(); - - source.Contains(value).Returns(true); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(unDoCollection.Contains(value)).IsEqualTo(source.Contains(value)); - } - - [Fact] - public void UnDoCollection_CopyTo_Should_CopyTo() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object[] values = []; - const int index = 42; - - bool done = false; - - source.When(s => s.CopyTo(values, index)).Do(_ => done = true); - - ICollection unDoCollection = source.AsUnDo(manager); - - unDoCollection.CopyTo(values, index); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_Count_Should_return_Count() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - source.Count.Returns(1337); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(unDoCollection.Count).IsEqualTo(source.Count); - } - - [Fact] - public void UnDoCollection_IsReadOnly_Should_return_IsReadOnly() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - source.IsReadOnly.Returns(true); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(unDoCollection.IsReadOnly).IsEqualTo(source.IsReadOnly); - } - - [Fact] - public void UnDoCollection_Remove_Should_return_Remove() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object value = new(); - - source.Remove(value).Returns(true); - source.Contains(value).Returns(true); - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(unDoCollection.Remove(value)).IsEqualTo(source.Remove(value)); - } - - [Fact] - public void UnDoCollection_Remove_Should_generate_Remove_description() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ICollection unDoCollection = source.AsUnDo(manager, d => description = d); - - object item = new(); - unDoCollection.Remove(item); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionRemove); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(item); - } - - [Fact] - public void UnDoCollection_GetEnumerator_T_Should_return_GetEnumerator_T() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For>(); - - source.GetEnumerator().Returns(enumerator); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(unDoCollection.GetEnumerator()).IsEqualTo(source.GetEnumerator()); - } - - [Fact] - public void UnDoCollection_GetEnumerator_Should_return_GetEnumerator() - { - ICollection source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For(); - - ((IEnumerable)source).GetEnumerator().Returns(enumerator); - - ICollection unDoCollection = source.AsUnDo(manager); - - Check.That(((IEnumerable)unDoCollection).GetEnumerator()).IsEqualTo(((IEnumerable)source).GetEnumerator()); - } - - [Fact] - public void UnDoCollection_CollectionChanged_add_Should_add_CollectionChanged() - { - ICollection source = Substitute.For, INotifyCollectionChanged>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For(); - NotifyCollectionChangedEventHandler handler = Substitute.For(); - - bool done = false; - - ((INotifyCollectionChanged)source).When(s => s.CollectionChanged += handler).Do(_ => done = true); - - ICollection unDoCollection = source.AsUnDo(manager); - - ((INotifyCollectionChanged)unDoCollection).CollectionChanged += handler; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_CollectionChanged_remove_Should_remove_CollectionChanged() - { - ICollection source = Substitute.For, INotifyCollectionChanged>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For(); - NotifyCollectionChangedEventHandler handler = Substitute.For(); - - bool done = false; - - ((INotifyCollectionChanged)source).When(s => s.CollectionChanged -= handler).Do(_ => done = true); - - ICollection unDoCollection = source.AsUnDo(manager); - - ((INotifyCollectionChanged)unDoCollection).CollectionChanged -= handler; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_PropertyChanged_add_Should_add_PropertyChanged() - { - ICollection source = Substitute.For, INotifyPropertyChanged>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For(); - PropertyChangedEventHandler handler = Substitute.For(); - - bool done = false; - - ((INotifyPropertyChanged)source).When(s => s.PropertyChanged += handler).Do(_ => done = true); - - ICollection unDoCollection = source.AsUnDo(manager); - - ((INotifyPropertyChanged)unDoCollection).PropertyChanged += handler; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoCollection_PropertyChanged_remove_Should_remove_PropertyChanged() - { - ICollection source = Substitute.For, INotifyPropertyChanged>(); - IUnDoManager manager = Substitute.For(); - IEnumerator enumerator = Substitute.For(); - PropertyChangedEventHandler handler = Substitute.For(); - - bool done = false; - - ((INotifyPropertyChanged)source).When(s => s.PropertyChanged -= handler).Do(_ => done = true); - - ICollection unDoCollection = source.AsUnDo(manager); - - ((INotifyPropertyChanged)unDoCollection).PropertyChanged -= handler; - - Check.That(done).IsTrue(); - } -} diff --git a/source/DefaultUnDo.Test/IDictionaryExtensionTest.cs b/source/DefaultUnDo.Test/IDictionaryExtensionTest.cs deleted file mode 100644 index 0dd1469..0000000 --- a/source/DefaultUnDo.Test/IDictionaryExtensionTest.cs +++ /dev/null @@ -1,264 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class IDictionaryExtensionTest -{ - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - IDictionary source = null; - - Check - .ThatCode(() => source.AsUnDo(Substitute.For())) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_manager_is_null() - { - IDictionary source = Substitute.For>(); - - Check - .ThatCode(() => source.AsUnDo(null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void AsUnDo_Should_return_an_IDictionary() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - Check.That(source.AsUnDo(manager)).IsNotNull(); - } - - [Fact] - public void UnDoDictionary_Add_key_Should_Add_key() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - bool done = false; - - source.When(s => s.Add(key, value)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - unDoDictionary.Add(key, value); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoDictionary_Add_Should_generate_Add_description() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); - - object key = new(); - object value = new(); - unDoCollection.Add(key, value); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryAdd); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(key); - Check.That(description.Value.Parameters[1]).IsEqualTo(value); - } - - [Fact] - public void UnDoDictionary_ContainsKey_Should_return_ContainsKey() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - - source.ContainsKey(key).Returns(true); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary.ContainsKey(key)).IsEqualTo(source.ContainsKey(key)); - } - - [Fact] - public void UnDoDictionary_Remove_key_Should_return_Remove_key() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - source.Remove(key).Returns(true); - source.TryGetValue(key, out value).ReturnsForAnyArgs(true); - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary.Remove(key)).IsEqualTo(source.Remove(key)); - } - - [Fact] - public void UnDoDictionary_Remove_Should_generate_Remove_description() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); - - object key = new(); - unDoCollection.Remove(key); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryRemove); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(key); - } - - [Fact] - public void UnDoDictionary_TryGetValue_Should_return_TryGetValue() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - source.TryGetValue(key, out object value2).ReturnsForAnyArgs(c => { c[1] = value; return true; }); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary.TryGetValue(key, out object value1)).IsEqualTo(source.TryGetValue(key, out value2)); - Check.That(value1).IsEqualTo(value); - Check.That(value1).IsEqualTo(value2); - } - - [Fact] - public void UnDoDictionary_this_key_get_Should_return_this_key_get() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - source[key].Returns(value); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary[key]).IsEqualTo(source[key]); - } - - [Fact] - public void UnDoDictionary_this_key_set_Should_set_this_key_When_TryGetValue_is_true() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - bool done = false; - - source.TryGetValue(key, out value).ReturnsForAnyArgs(true); - source.When(s => s[key] = value).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - unDoDictionary[key] = value; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoDictionary_this_key_set_Should_set_this_key_When_TryGetValue_is_false() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object key = new(); - object value = new(); - - bool done = false; - - source.TryGetValue(key, out value).ReturnsForAnyArgs(false); - source.When(s => s[key] = value).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - unDoDictionary[key] = value; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoDictionary_this_key_set_Should_generate_this_description() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); - - object key = new(); - object value = new(); - unDoCollection[key] = value; - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryIndexer); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(key); - Check.That(description.Value.Parameters[1]).IsEqualTo(value); - } - - [Fact] - public void UnDoDictionary_Keys_Should_return_Keys() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ICollection keys = Substitute.For>(); - - source.Keys.Returns(keys); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary.Keys).IsEqualTo(source.Keys); - } - - [Fact] - public void UnDoDictionary_Values_Should_return_Values() - { - IDictionary source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ICollection values = Substitute.For>(); - - source.Values.Returns(values); - - IDictionary unDoDictionary = source.AsUnDo(manager); - - Check.That(unDoDictionary.Values).IsEqualTo(source.Values); - } -} diff --git a/source/DefaultUnDo.Test/IListExtensionTest.cs b/source/DefaultUnDo.Test/IListExtensionTest.cs deleted file mode 100644 index 8957fff..0000000 --- a/source/DefaultUnDo.Test/IListExtensionTest.cs +++ /dev/null @@ -1,266 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class IListExtensionTest -{ - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - IList source = null; - - Check - .ThatCode(() => source.AsUnDo(Substitute.For())) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_manager_is_null() - { - IList source = Substitute.For>(); - - Check - .ThatCode(() => source.AsUnDo(null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void UnDoList_IndexOf_Should_return_IndexOf() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - object value = new(); - - source.IndexOf(value).Returns(42); - - IList unDoList = source.AsUnDo(manager); - - Check.That(unDoList.IndexOf(value)).IsEqualTo(source.IndexOf(value)); - } - - [Fact] - public void UnDoList_Insert_Should_Insert() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - const int index = 42; - object value = new(); - - bool done = false; - - source.When(s => s.Insert(index, value)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IList unDoList = source.AsUnDo(manager); - - unDoList.Insert(index, value); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoList_Insert_Should_generate_Insert_description() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IList unDoCollection = source.AsUnDo(manager, d => description = d); - - const int index = 42; - object item = new(); - unDoCollection.Insert(index, item); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListInsert); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(index); - Check.That(description.Value.Parameters[1]).IsEqualTo(item); - } - - [Fact] - public void UnDoList_RemoveAt_Should_RemoveAt() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - const int index = 42; - - bool done = false; - - source.When(s => s.RemoveAt(index)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IList unDoList = source.AsUnDo(manager); - - unDoList.RemoveAt(index); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoList_RemoveAt_Should_generate_RemoveAt_description() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IList unDoCollection = source.AsUnDo(manager, d => description = d); - - const int index = 42; - unDoCollection.RemoveAt(index); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListRemoveAt); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(index); - } - - [Fact] - public void UnDoList_this_index_get_Should_return_this_index_get() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - const int index = 42; - object value = new(); - - source[index].Returns(value); - - IList unDoList = source.AsUnDo(manager); - - Check.That(unDoList[index]).IsEqualTo(source[index]); - } - - [Fact] - public void UnDoList_this_index_set_Should_set_this_index() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - const int index = 42; - object value = new(); - - bool done = false; - - source.When(s => s[index] = value).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - IList unDoList = source.AsUnDo(manager); - - unDoList[index] = value; - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoList_this_index_set_Should_generate_this_description() - { - IList source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - IList unDoCollection = source.AsUnDo(manager, d => description = d); - - const int index = 42; - object item = new(); - unDoCollection[index] = item; - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListIndexer); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(index); - Check.That(description.Value.Parameters[1]).IsEqualTo(item); - } - - [Fact] - public void Move_Should_throw_When_source_is_null() - { - IList items = null; - - Check.ThatCode(() => items.Move(0, 1)).Throws(); - } - - [Fact] - public void Move_Should_move_item() - { - List items = [1, 2]; - - items.Move(0, 1); - - Check.That(items).ContainsExactly(2, 1); - } - - [Fact] - public void Move_Should_move_item_as_UnDo_operation_When_UnDoList() - { - IUnDoManager manager = new UnDoManager(); - - IList items = new List { 1, 2 }.AsUnDo(manager); - - items.Move(0, 1); - - Check.That(items).ContainsExactly(2, 1); - - manager.Undo(); - - Check.That(items).ContainsExactly(1, 2); - - items = new ObservableCollection { 1, 2 }.AsUnDo(manager); - - items.Move(0, 1); - - Check.That(items).ContainsExactly(2, 1); - - manager.Undo(); - - Check.That(items).ContainsExactly(1, 2); - } - - [Fact] - public void Move_Should_set_description_as_Move() - { - IUnDoManager manager = Substitute.For(); - manager.Do(Arg.Do(i => i.Do())); - UnDoCollectionOperation? description = null; - - IList unDoCollection = new ObservableCollection { 1, 2 }.AsUnDo(manager, a => description ??= a); - - unDoCollection.Move(0, 1); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListMove); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(0); - Check.That(description.Value.Parameters[1]).IsEqualTo(1); - - description = null; - unDoCollection = Substitute.For>().AsUnDo(manager, a => description ??= a); - - unDoCollection.Move(42, 43); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListMove); - Check.That(description.Value.Parameters.Length).IsEqualTo(2); - Check.That(description.Value.Parameters[0]).IsEqualTo(42); - Check.That(description.Value.Parameters[1]).IsEqualTo(43); - } -} diff --git a/source/DefaultUnDo.Test/ISetExtensionTest.cs b/source/DefaultUnDo.Test/ISetExtensionTest.cs deleted file mode 100644 index 784df09..0000000 --- a/source/DefaultUnDo.Test/ISetExtensionTest.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class ISetExtensionTest -{ - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - ISet source = null; - - Check - .ThatCode(() => source.AsUnDo(Substitute.For())) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void AsUnDo_Should_throw_ArgumentNullException_When_manager_is_null() - { - ISet source = Substitute.For>(); - - Check - .ThatCode(() => source.AsUnDo(null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void UnDoSet_Add_Should_return_true_When_added() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - manager.Do(Arg.Do(i => i.Do())); - source.When(s => ((ICollection)s).Add(42)).Do(_ => done = true); - - source.Contains(42).Returns(false); - Check.That(unDoSet.Add(42)).IsTrue(); - Check.That(done).IsTrue(); - - done = false; - source.Contains(42).Returns(true); - Check.That(unDoSet.Add(42)).IsFalse(); - Check.That(done).IsFalse(); - } - - [Fact] - public void UnDoSet_Add_Should_generate_Add_description() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ISet unDoCollection = source.AsUnDo(manager, d => description = d); - - object item = new(); - unDoCollection.Add(item); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetAdd); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(item); - } - - [Fact] - public void UnDoSet_ExceptWith_Should_work() - { - IUnDoManager manager = new UnDoManager(); - ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); - - unDoSet.ExceptWith([2]); - - Check.That(unDoSet.Order()).ContainsExactly(1, 3); - - manager.Undo(); - - Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); - } - - [Fact] - public void UnDoSet_ExceptWith_Should_generate_ExceptWith_description() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - source.Count.Returns(42); - manager.Do(Arg.Do(i => i.Do())); - - ISet unDoCollection = source.AsUnDo(manager, d => description = d); - - IEnumerable other = []; - unDoCollection.ExceptWith(other); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetExceptWith); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(other); - } - - [Fact] - public void UnDoSet_IntersectWith_Should_work() - { - IUnDoManager manager = new UnDoManager(); - ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); - - unDoSet.IntersectWith([2]); - - Check.That(unDoSet.Order()).ContainsExactly(2); - - manager.Undo(); - - Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); - } - - [Fact] - public void UnDoSet_IntersectWith_Should_generate_IntersectWith_description() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - source.Count.Returns(42); - manager.Do(Arg.Do(i => i.Do())); - - ISet unDoCollection = source.AsUnDo(manager, d => description = d); - - IEnumerable other = []; - unDoCollection.IntersectWith([]); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetIntersectWith); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(other); - } - - [Fact] - public void UnDoSet_IsProperSubsetOf_Should_call_IsProperSubsetOf() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.IsProperSubsetOf(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.IsProperSubsetOf(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_IsProperSupersetOf_Should_call_IsProperSupersetOf() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.IsProperSupersetOf(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.IsProperSupersetOf(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_IsSubsetOf_Should_call_IsSubsetOf() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.IsSubsetOf(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.IsSubsetOf(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_IsSupersetOf_Should_call_IsSupersetOf() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.IsSupersetOf(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.IsSupersetOf(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_Overlaps_Should_call_Overlaps() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.Overlaps(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.Overlaps(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_SetEquals_Should_call_SetEquals() - { - ISet source = Substitute.For>(); - IEnumerable other = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - ISet unDoSet = source.AsUnDo(manager); - bool done = false; - - source.When(s => s.SetEquals(other)).Do(_ => done = true); - manager.Do(Arg.Do(i => i.Do())); - - unDoSet.SetEquals(other); - - Check.That(done).IsTrue(); - } - - [Fact] - public void UnDoSet_SymmetricExceptWith_Should_work() - { - IUnDoManager manager = new UnDoManager(); - ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); - - unDoSet.SymmetricExceptWith([2, 3, 4]); - - Check.That(unDoSet.Order()).ContainsExactly(1, 4); - - manager.Undo(); - - Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); - } - - [Fact] - public void UnDoSet_SymmetricExceptWith_Should_generate_SymmetricExceptWith_description() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ISet unDoCollection = source.AsUnDo(manager, d => description = d); - - IEnumerable other = []; - unDoCollection.SymmetricExceptWith(other); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetSymmetricExceptWith); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(other); - } - - [Fact] - public void UnDoSet_UnionWith_Should_work() - { - IUnDoManager manager = new UnDoManager(); - ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); - - unDoSet.UnionWith([2, 3, 4]); - - Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3, 4); - - manager.Undo(); - - Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); - } - - [Fact] - public void UnDoSet_UnionWith_Should_generate_UnionWith_description() - { - ISet source = Substitute.For>(); - IUnDoManager manager = Substitute.For(); - - UnDoCollectionOperation? description = null; - - manager.Do(Arg.Do(i => i.Do())); - - ISet unDoCollection = source.AsUnDo(manager, d => description = d); - - IEnumerable other = []; - unDoCollection.UnionWith(other); - - Check.That(description.HasValue).IsTrue(); - Check.That(description.Value.Collection).IsEqualTo(unDoCollection); - Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetUnionWith); - Check.That(description.Value.Parameters.Length).IsEqualTo(1); - Check.That(description.Value.Parameters[0]).IsEqualTo(other); - } -} diff --git a/source/DefaultUnDo.Test/IUnDoManagerExtensionTest.cs b/source/DefaultUnDo.Test/IUnDoManagerExtensionTest.cs deleted file mode 100644 index a6228eb..0000000 --- a/source/DefaultUnDo.Test/IUnDoManagerExtensionTest.cs +++ /dev/null @@ -1,459 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using NSubstitute.ExceptionExtensions; -using Xunit; - -namespace DefaultUnDo; - -public sealed class IUnDoManagerExtensionTest -{ - [Fact] - public void DoAdd_ISet_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - ISet source = null; - - Check - .ThatCode(() => manager.DoAdd(source, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoAdd_ISet_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - ISet source = null; - - Check - .ThatCode(() => manager.DoAdd(source, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoAdd_ICollection_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - ICollection source = null; - - Check - .ThatCode(() => manager.DoAdd(source, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoAdd_ICollection_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - ICollection source = null; - - Check - .ThatCode(() => manager.DoAdd(source, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoAdd_ICollection_Should_keep_index_When_source_is_IList() - { - IUnDoManager manager = new UnDoManager(); - ICollection source = [0, 1]; - - manager.DoAdd(source, 2); - - source.Add(3); - - manager.Undo(); - - Check.That(source).ContainsExactly(0, 1, 3); - - manager.Redo(); - - Check.That(source).ContainsExactly(0, 1, 2, 3); - } - - [Fact] - public void DoClear_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - ICollection source = null; - - Check - .ThatCode(() => manager.DoClear(source)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoClear_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - ICollection source = null; - - Check - .ThatCode(() => manager.DoClear(source)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoClear_Should_add_old_elements_When_undone() - { - ICollection source = [ - new(), - new(), - new() - ]; - IUnDoManager manager = Substitute.For(); - IUnDo undo = null; - List sourceCopy = [.. source]; - - manager.Do(Arg.Do(i => undo = i)); - - manager.DoClear(source); - - Check.That(undo).IsNotNull(); - - undo.Do(); - - Check.That(source.Count).IsEqualTo(0); - - undo.Undo(); - - Check.That(source).ContainsExactly(sourceCopy); - } - - [Fact] - public void DoRemove_ICollection_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - ICollection source = null; - - Check - .ThatCode(() => manager.DoRemove(source, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoRemove_ICollection_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - ICollection source = null; - - Check - .ThatCode(() => manager.DoRemove(source, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoRemove_ICollection_Should_keep_index_When_source_is_IList() - { - IUnDoManager manager = new UnDoManager(); - ICollection source = [0, 1]; - - manager.DoRemove(source, 0); - - manager.Undo(); - - Check.That(source).ContainsExactly(0, 1); - } - - [Fact] - public void DoAdd_IDictionary_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.DoAdd(source, key, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoAdd_IDictionary_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.DoAdd(source, key, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoAdd_IDictionary_Should_throw_ArgumentNullException_When_key_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = Substitute.For>(); - object key = null; - - Check - .ThatCode(() => manager.DoAdd(source, key, null)) - .Throws() - .WithProperty("ParamName", "key"); - } - - [Fact] - public void DoRemove_IDictionary_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.DoRemove(source, key)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoRemove_IDictionary_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.DoRemove(source, key)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoRemove_IDictionary_Should_throw_ArgumentNullException_When_key_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = Substitute.For>(); - object key = null; - - Check - .ThatCode(() => manager.DoRemove(source, key)) - .Throws() - .WithProperty("ParamName", "key"); - } - - [Fact] - public void Do_IDictionary_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.Do(source, key, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void Do_IDictionary_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = null; - object key = null; - - Check - .ThatCode(() => manager.Do(source, key, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void Do_IDictionary_Should_throw_ArgumentNullException_When_key_is_null() - { - IUnDoManager manager = Substitute.For(); - IDictionary source = Substitute.For>(); - object key = null; - - Check - .ThatCode(() => manager.Do(source, key, null)) - .Throws() - .WithProperty("ParamName", "key"); - } - - [Fact] - public void Do_IDictionary_Should_remove_element_When_undone() - { - object key = new(); - IDictionary source = new Dictionary(); - IUnDoManager manager = Substitute.For(); - IUnDo undo = null; - - manager.Do(Arg.Do(i => undo = i)); - - manager.Do(source, key, null); - - Check.That(undo).IsNotNull(); - - undo.Do(); - - Check.That(source.ContainsKey(key)).IsTrue(); - - undo.Undo(); - - Check.That(source.ContainsKey(key)).IsFalse(); - } - - [Fact] - public void DoInsert_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IList source = null; - - Check - .ThatCode(() => manager.DoInsert(source, 0, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoInsert_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IList source = null; - - Check - .ThatCode(() => manager.DoInsert(source, 0, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void DoRemoveAt_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IList source = null; - - Check - .ThatCode(() => manager.DoRemoveAt(source, 0)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void DoRemoveAt_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IList source = null; - - Check - .ThatCode(() => manager.DoRemoveAt(source, 0)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void Do_IList_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - IList source = null; - - Check - .ThatCode(() => manager.Do(source, 0, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void Do_IList_Should_throw_ArgumentNullException_When_source_is_null() - { - IUnDoManager manager = Substitute.For(); - IList source = null; - - Check - .ThatCode(() => manager.Do(source, 0, null)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void Do_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - Action doAction = null; - Action undoAction = null; - - Check - .ThatCode(() => manager.Do(doAction, undoAction)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void Do_Should_no_do_anything_When_both_actions_are_null() - { - IUnDoManager manager = new UnDoManager(); - Action doAction = null; - Action undoAction = null; - - manager.Do(doAction, undoAction); - - Check.That(manager.CanUndo).IsFalse(); - } - - [Fact] - public void DoOnDo_Should_call_action() - { - IUnDoManager manager = Substitute.For(); - IUnDo undo = null; - bool done = false; - - manager.Do(Arg.Do(i => undo = i)); - manager.DoOnDo(() => done = true); - - Check.That(undo).IsNotNull(); - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void DoOnUnDo_Should_call_action() - { - IUnDoManager manager = Substitute.For(); - IUnDo undo = null; - bool done = false; - - manager.Do(Arg.Do(i => undo = i)); - manager.DoOnUndo(() => done = true); - - Check.That(undo).IsNotNull(); - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Do_ValueUnDo_Should_throw_ArgumentNullException_When_manager_is_null() - { - IUnDoManager manager = null; - Action setter = null; - - Check - .ThatCode(() => manager.Do(setter, null, null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void Do_ValueUnDo_Should_throw_ArgumentNullException_When_setter_is_null() - { - IUnDoManager manager = Substitute.For(); - Action setter = null; - - Check - .ThatCode(() => manager.Do(setter, null, null)) - .Throws() - .WithProperty("ParamName", "setter"); - } -} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/AddShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/AddShould.cs new file mode 100644 index 0000000..e0e9fae --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/AddShould.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class AddShould +{ + [Fact] + public void Add() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object value = new(); + + bool done = false; + + source.When(s => s.Add(value)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager); + + unDoCollection.Add(value); + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateAddDescription() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager, d => description = d); + + object item = new(); + unDoCollection.Add(item); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionAdd); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(item); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ClearShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ClearShould.cs new file mode 100644 index 0000000..0d68111 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ClearShould.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class ClearShould +{ + [Fact] + public void Clear() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + bool done = false; + + source.Count.Returns(42); + source.When(s => s.Clear()).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager); + + unDoCollection.Clear(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateClearDescription() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager, d => description = d); + + unDoCollection.Clear(); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionClear); + Check.That(description.Value.Parameters.Length).IsZero(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CollectionChangedShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CollectionChangedShould.cs new file mode 100644 index 0000000..4ad1c1c --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CollectionChangedShould.cs @@ -0,0 +1,49 @@ +using System.Collections; +using System.Collections.Generic; +using System.Collections.Specialized; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class CollectionChangedShould +{ + [Fact] + public void AddEventWhenAdd() + { + ICollection source = Substitute.For, INotifyCollectionChanged>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For(); + NotifyCollectionChangedEventHandler handler = Substitute.For(); + + bool done = false; + + ((INotifyCollectionChanged)source).When(s => s.CollectionChanged += handler).Do(_ => done = true); + + ICollection unDoCollection = source.AsUnDo(manager); + + ((INotifyCollectionChanged)unDoCollection).CollectionChanged += handler; + + Check.That(done).IsTrue(); + } + + [Fact] + public void RemoveEventWhenRemove() + { + ICollection source = Substitute.For, INotifyCollectionChanged>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For(); + NotifyCollectionChangedEventHandler handler = Substitute.For(); + + bool done = false; + + ((INotifyCollectionChanged)source).When(s => s.CollectionChanged -= handler).Do(_ => done = true); + + ICollection unDoCollection = source.AsUnDo(manager); + + ((INotifyCollectionChanged)unDoCollection).CollectionChanged -= handler; + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ContainsShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ContainsShould.cs new file mode 100644 index 0000000..04694f4 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/ContainsShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class ContainsShould +{ + [Fact] + public void ReturnContains() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object value = new(); + + source.Contains(value).Returns(true); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(unDoCollection.Contains(value)).IsEqualTo(source.Contains(value)); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CopyToShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CopyToShould.cs new file mode 100644 index 0000000..dd8ac7d --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CopyToShould.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class CopyToShould +{ + [Fact] + public void CopyTo() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object[] values = []; + const int index = 42; + + bool done = false; + + source.When(s => s.CopyTo(values, index)).Do(_ => done = true); + + ICollection unDoCollection = source.AsUnDo(manager); + + unDoCollection.CopyTo(values, index); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CountShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CountShould.cs new file mode 100644 index 0000000..c5bf9ca --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/CountShould.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class CountShould +{ + [Fact] + public void ReturnCount() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + source.Count.Returns(1337); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(unDoCollection.Count).IsEqualTo(source.Count); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorShould.cs new file mode 100644 index 0000000..f7b4098 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorShould.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class GetEnumeratorShould +{ + [Fact] + public void ReturnGetEnumerator() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For(); + + ((IEnumerable)source).GetEnumerator().Returns(enumerator); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(((IEnumerable)unDoCollection).GetEnumerator()).IsEqualTo(((IEnumerable)source).GetEnumerator()); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorTShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorTShould.cs new file mode 100644 index 0000000..550a68e --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/GetEnumeratorTShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class GetEnumeratorTShould +{ + [Fact] + public void ReturnGetEnumeratorT() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For>(); + + source.GetEnumerator().Returns(enumerator); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(unDoCollection.GetEnumerator()).IsEqualTo(source.GetEnumerator()); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/IsReadOnlyShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/IsReadOnlyShould.cs new file mode 100644 index 0000000..8a145a8 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/IsReadOnlyShould.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class IsReadOnlyShould +{ + [Fact] + public void ReturnIsReadOnly() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + source.IsReadOnly.Returns(true); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(unDoCollection.IsReadOnly).IsEqualTo(source.IsReadOnly); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/PropertyChangedShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/PropertyChangedShould.cs new file mode 100644 index 0000000..d803cdf --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/PropertyChangedShould.cs @@ -0,0 +1,49 @@ +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class PropertyChangedShould +{ + [Fact] + public void AddEventWhenAdd() + { + ICollection source = Substitute.For, INotifyPropertyChanged>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For(); + PropertyChangedEventHandler handler = Substitute.For(); + + bool done = false; + + ((INotifyPropertyChanged)source).When(s => s.PropertyChanged += handler).Do(_ => done = true); + + ICollection unDoCollection = source.AsUnDo(manager); + + ((INotifyPropertyChanged)unDoCollection).PropertyChanged += handler; + + Check.That(done).IsTrue(); + } + + [Fact] + public void RemoveEventWhenRemove() + { + ICollection source = Substitute.For, INotifyPropertyChanged>(); + IUnDoManager manager = Substitute.For(); + IEnumerator enumerator = Substitute.For(); + PropertyChangedEventHandler handler = Substitute.For(); + + bool done = false; + + ((INotifyPropertyChanged)source).When(s => s.PropertyChanged -= handler).Do(_ => done = true); + + ICollection unDoCollection = source.AsUnDo(manager); + + ((INotifyPropertyChanged)unDoCollection).PropertyChanged -= handler; + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/RemoveShould.cs b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/RemoveShould.cs new file mode 100644 index 0000000..1ba3a4f --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoICollectionTests/RemoveShould.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoICollectionTests; + +public sealed class RemoveShould +{ + [Fact] + public void ReturnRemove() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object value = new(); + + source.Remove(value).Returns(true); + source.Contains(value).Returns(true); + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager); + + Check.That(unDoCollection.Remove(value)).IsEqualTo(source.Remove(value)); + } + + [Fact] + public void GenerateRemoveDescription() + { + ICollection source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ICollection unDoCollection = source.AsUnDo(manager, d => description = d); + + object item = new(); + unDoCollection.Remove(item); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ICollectionRemove); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(item); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/AddShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/AddShould.cs new file mode 100644 index 0000000..8d61cc8 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/AddShould.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class AddShould +{ + [Fact] + public void AddKey() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + bool done = false; + + source.When(s => s.Add(key, value)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + unDoDictionary.Add(key, value); + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateAddDescription() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); + + object key = new(); + object value = new(); + unDoCollection.Add(key, value); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryAdd); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(key); + Check.That(description.Value.Parameters[1]).IsEqualTo(value); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ContainsKeyShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ContainsKeyShould.cs new file mode 100644 index 0000000..632a47e --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ContainsKeyShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class ContainsKeyShould +{ + [Fact] + public void ReturnContainsKey() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + + source.ContainsKey(key).Returns(true); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary.ContainsKey(key)).IsEqualTo(source.ContainsKey(key)); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/KeysShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/KeysShould.cs new file mode 100644 index 0000000..46b53b0 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/KeysShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class KeysShould +{ + [Fact] + public void ReturnKeys() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ICollection keys = Substitute.For>(); + + source.Keys.Returns(keys); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary.Keys).IsEqualTo(source.Keys); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/RemoveShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/RemoveShould.cs new file mode 100644 index 0000000..5ff61e2 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/RemoveShould.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class RemoveShould +{ + [Fact] + public void ReturnRemoveKey() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + source.Remove(key).Returns(true); + source.TryGetValue(key, out value).ReturnsForAnyArgs(true); + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary.Remove(key)).IsEqualTo(source.Remove(key)); + } + + [Fact] + public void GenerateRemoveDescription() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); + + object key = new(); + unDoCollection.Remove(key); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryRemove); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(key); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ThisIndexerShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ThisIndexerShould.cs new file mode 100644 index 0000000..4b5b9dc --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ThisIndexerShould.cs @@ -0,0 +1,91 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class ThisIndexerShould +{ + [Fact] + public void ReturnThisKeyGet() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + source[key].Returns(value); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary[key]).IsEqualTo(source[key]); + } + + [Fact] + public void SetThisKeyWhenTryGetValueIsTrue() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + bool done = false; + + source.TryGetValue(key, out value).ReturnsForAnyArgs(true); + source.When(s => s[key] = value).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + unDoDictionary[key] = value; + + Check.That(done).IsTrue(); + } + + [Fact] + public void SetThisKeyWhenTryGetValueIsFalse() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + bool done = false; + + source.TryGetValue(key, out value).ReturnsForAnyArgs(false); + source.When(s => s[key] = value).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + unDoDictionary[key] = value; + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateThisDescription() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IDictionary unDoCollection = source.AsUnDo(manager, d => description = d); + + object key = new(); + object value = new(); + unDoCollection[key] = value; + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IDictionaryIndexer); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(key); + Check.That(description.Value.Parameters[1]).IsEqualTo(value); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/TryGetValueShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/TryGetValueShould.cs new file mode 100644 index 0000000..41ff12a --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/TryGetValueShould.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class TryGetValueShould +{ + [Fact] + public void ReturnTryGetValue() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object key = new(); + object value = new(); + + source.TryGetValue(key, out object value2).ReturnsForAnyArgs(c => { c[1] = value; return true; }); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary.TryGetValue(key, out object value1)).IsEqualTo(source.TryGetValue(key, out value2)); + Check.That(value1).IsEqualTo(value); + Check.That(value1).IsEqualTo(value2); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ValuesShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ValuesShould.cs new file mode 100644 index 0000000..1f298ed --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIDictionaryTests/ValuesShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIDictionaryTests; + +public sealed class ValuesShould +{ + [Fact] + public void ReturnValues() + { + IDictionary source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ICollection values = Substitute.For>(); + + source.Values.Returns(values); + + IDictionary unDoDictionary = source.AsUnDo(manager); + + Check.That(unDoDictionary.Values).IsEqualTo(source.Values); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIListTests/IndexOfShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIListTests/IndexOfShould.cs new file mode 100644 index 0000000..fbcf662 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIListTests/IndexOfShould.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIListTests; + +public sealed class IndexOfShould +{ + [Fact] + public void ReturnIndexOf() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + object value = new(); + + source.IndexOf(value).Returns(42); + + IList unDoList = source.AsUnDo(manager); + + Check.That(unDoList.IndexOf(value)).IsEqualTo(source.IndexOf(value)); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIListTests/InsertShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIListTests/InsertShould.cs new file mode 100644 index 0000000..6c34411 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIListTests/InsertShould.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIListTests; + +public sealed class InsertShould +{ + [Fact] + public void Insert() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + const int index = 42; + object value = new(); + + bool done = false; + + source.When(s => s.Insert(index, value)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IList unDoList = source.AsUnDo(manager); + + unDoList.Insert(index, value); + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateInsertDescription() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IList unDoCollection = source.AsUnDo(manager, d => description = d); + + const int index = 42; + object item = new(); + unDoCollection.Insert(index, item); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListInsert); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(index); + Check.That(description.Value.Parameters[1]).IsEqualTo(item); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIListTests/MoveShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIListTests/MoveShould.cs new file mode 100644 index 0000000..5ff8565 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIListTests/MoveShould.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIListTests; + +public sealed class MoveShould +{ + [Fact] + public void ThrowWhenSourceIsNull() + { + IList items = null; + + Check.ThatCode(() => items.Move(0, 1)).Throws(); + } + + [Fact] + public void MoveItem() + { + List items = [1, 2]; + + items.Move(0, 1); + + Check.That(items).ContainsExactly(2, 1); + } + + [Fact] + public void MoveItemAsUnDoOperationWhenUnDoList() + { + IUnDoManager manager = new UnDoManager(); + + IList items = new List { 1, 2 }.AsUnDo(manager); + + items.Move(0, 1); + + Check.That(items).ContainsExactly(2, 1); + + manager.Undo(); + + Check.That(items).ContainsExactly(1, 2); + + items = new ObservableCollection { 1, 2 }.AsUnDo(manager); + + items.Move(0, 1); + + Check.That(items).ContainsExactly(2, 1); + + manager.Undo(); + + Check.That(items).ContainsExactly(1, 2); + } + + [Fact] + public void SetDescriptionAsMove() + { + IUnDoManager manager = Substitute.For(); + manager.Do(Arg.Do(i => i.Do())); + UnDoCollectionOperation? description = null; + + IList unDoCollection = new ObservableCollection { 1, 2 }.AsUnDo(manager, a => description ??= a); + + unDoCollection.Move(0, 1); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListMove); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(0); + Check.That(description.Value.Parameters[1]).IsEqualTo(1); + + description = null; + unDoCollection = Substitute.For>().AsUnDo(manager, a => description ??= a); + + unDoCollection.Move(42, 43); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListMove); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(42); + Check.That(description.Value.Parameters[1]).IsEqualTo(43); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIListTests/RemoveAtShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIListTests/RemoveAtShould.cs new file mode 100644 index 0000000..c847c4a --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIListTests/RemoveAtShould.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIListTests; + +public sealed class RemoveAtShould +{ + [Fact] + public void RemoveAt() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + const int index = 42; + + bool done = false; + + source.When(s => s.RemoveAt(index)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IList unDoList = source.AsUnDo(manager); + + unDoList.RemoveAt(index); + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateRemoveAtDescription() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IList unDoCollection = source.AsUnDo(manager, d => description = d); + + const int index = 42; + unDoCollection.RemoveAt(index); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListRemoveAt); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(index); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoIListTests/ThisIndexerShould.cs b/source/DefaultUnDo.Test/Internal/UnDoIListTests/ThisIndexerShould.cs new file mode 100644 index 0000000..794af2c --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoIListTests/ThisIndexerShould.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoIListTests; + +public sealed class ThisIndexerShould +{ + [Fact] + public void ReturnThisIndexGet() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + const int index = 42; + object value = new(); + + source[index].Returns(value); + + IList unDoList = source.AsUnDo(manager); + + Check.That(unDoList[index]).IsEqualTo(source[index]); + } + + [Fact] + public void SetThisIndex() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + const int index = 42; + object value = new(); + + bool done = false; + + source.When(s => s[index] = value).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + IList unDoList = source.AsUnDo(manager); + + unDoList[index] = value; + + Check.That(done).IsTrue(); + } + + [Fact] + public void GenerateThisDescription() + { + IList source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + IList unDoCollection = source.AsUnDo(manager, d => description = d); + + const int index = 42; + object item = new(); + unDoCollection[index] = item; + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.IListIndexer); + Check.That(description.Value.Parameters.Length).IsEqualTo(2); + Check.That(description.Value.Parameters[0]).IsEqualTo(index); + Check.That(description.Value.Parameters[1]).IsEqualTo(item); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/AddShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/AddShould.cs new file mode 100644 index 0000000..a73cad6 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/AddShould.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class AddShould +{ + [Fact] + public void ReturnTrueWhenAdded() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + manager.Do(Arg.Do(i => i.Do())); + source.When(s => ((ICollection)s).Add(42)).Do(_ => done = true); + + source.Contains(42).Returns(false); + Check.That(unDoSet.Add(42)).IsTrue(); + Check.That(done).IsTrue(); + + done = false; + source.Contains(42).Returns(true); + Check.That(unDoSet.Add(42)).IsFalse(); + Check.That(done).IsFalse(); + } + + [Fact] + public void GenerateAddDescription() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ISet unDoCollection = source.AsUnDo(manager, d => description = d); + + object item = new(); + unDoCollection.Add(item); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetAdd); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(item); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/ExceptWithShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/ExceptWithShould.cs new file mode 100644 index 0000000..3a1314c --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/ExceptWithShould.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Linq; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class ExceptWithShould +{ + [Fact] + public void Work() + { + IUnDoManager manager = new UnDoManager(); + ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); + + unDoSet.ExceptWith([2]); + + Check.That(unDoSet.Order()).ContainsExactly(1, 3); + + manager.Undo(); + + Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); + } + + [Fact] + public void GenerateExceptWithDescription() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + source.Count.Returns(42); + manager.Do(Arg.Do(i => i.Do())); + + ISet unDoCollection = source.AsUnDo(manager, d => description = d); + + IEnumerable other = []; + unDoCollection.ExceptWith(other); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetExceptWith); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(other); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/IntersectWithShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IntersectWithShould.cs new file mode 100644 index 0000000..a7c0b2d --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IntersectWithShould.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Linq; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class IntersectWithShould +{ + [Fact] + public void Work() + { + IUnDoManager manager = new UnDoManager(); + ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); + + unDoSet.IntersectWith([2]); + + Check.That(unDoSet.Order()).ContainsExactly(2); + + manager.Undo(); + + Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); + } + + [Fact] + public void GenerateIntersectWithDescription() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + source.Count.Returns(42); + manager.Do(Arg.Do(i => i.Do())); + + ISet unDoCollection = source.AsUnDo(manager, d => description = d); + + IEnumerable other = []; + unDoCollection.IntersectWith([]); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetIntersectWith); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(other); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSubsetOfShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSubsetOfShould.cs new file mode 100644 index 0000000..6b7e2ff --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSubsetOfShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class IsProperSubsetOfShould +{ + [Fact] + public void CallIsProperSubsetOf() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.IsProperSubsetOf(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.IsProperSubsetOf(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSupersetOfShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSupersetOfShould.cs new file mode 100644 index 0000000..9ff8437 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsProperSupersetOfShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class IsProperSupersetOfShould +{ + [Fact] + public void CallIsProperSupersetOf() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.IsProperSupersetOf(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.IsProperSupersetOf(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSubsetOfShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSubsetOfShould.cs new file mode 100644 index 0000000..86a7e2b --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSubsetOfShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class IsSubsetOfShould +{ + [Fact] + public void CallIsSubsetOf() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.IsSubsetOf(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.IsSubsetOf(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSupersetOfShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSupersetOfShould.cs new file mode 100644 index 0000000..f8d54d9 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/IsSupersetOfShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class IsSupersetOfShould +{ + [Fact] + public void CallIsSupersetOf() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.IsSupersetOf(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.IsSupersetOf(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/OverlapsShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/OverlapsShould.cs new file mode 100644 index 0000000..49cccfa --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/OverlapsShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class OverlapsShould +{ + [Fact] + public void CallOverlaps() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.Overlaps(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.Overlaps(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/SetEqualsShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/SetEqualsShould.cs new file mode 100644 index 0000000..8b267fb --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/SetEqualsShould.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class SetEqualsShould +{ + [Fact] + public void CallSetEquals() + { + ISet source = Substitute.For>(); + IEnumerable other = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + ISet unDoSet = source.AsUnDo(manager); + bool done = false; + + source.When(s => s.SetEquals(other)).Do(_ => done = true); + manager.Do(Arg.Do(i => i.Do())); + + unDoSet.SetEquals(other); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/SymmetricExceptWithShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/SymmetricExceptWithShould.cs new file mode 100644 index 0000000..7a0ab4d --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/SymmetricExceptWithShould.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using System.Linq; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class SymmetricExceptWithShould +{ + [Fact] + public void Work() + { + IUnDoManager manager = new UnDoManager(); + ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); + + unDoSet.SymmetricExceptWith([2, 3, 4]); + + Check.That(unDoSet.Order()).ContainsExactly(1, 4); + + manager.Undo(); + + Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); + } + + [Fact] + public void GenerateSymmetricExceptWithDescription() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ISet unDoCollection = source.AsUnDo(manager, d => description = d); + + IEnumerable other = []; + unDoCollection.SymmetricExceptWith(other); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetSymmetricExceptWith); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(other); + } +} diff --git a/source/DefaultUnDo.Test/Internal/UnDoISetTests/UnionWithShould.cs b/source/DefaultUnDo.Test/Internal/UnDoISetTests/UnionWithShould.cs new file mode 100644 index 0000000..52037b2 --- /dev/null +++ b/source/DefaultUnDo.Test/Internal/UnDoISetTests/UnionWithShould.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using System.Linq; +using DefaultUnDo; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.Internal.UnDoISetTests; + +public sealed class UnionWithShould +{ + [Fact] + public void Work() + { + IUnDoManager manager = new UnDoManager(); + ISet unDoSet = new HashSet { 1, 2, 3 }.AsUnDo(manager); + + unDoSet.UnionWith([2, 3, 4]); + + Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3, 4); + + manager.Undo(); + + Check.That(unDoSet.Order()).ContainsExactly(1, 2, 3); + } + + [Fact] + public void GenerateUnionWithDescription() + { + ISet source = Substitute.For>(); + IUnDoManager manager = Substitute.For(); + + UnDoCollectionOperation? description = null; + + manager.Do(Arg.Do(i => i.Do())); + + ISet unDoCollection = source.AsUnDo(manager, d => description = d); + + IEnumerable other = []; + unDoCollection.UnionWith(other); + + Check.That(description.HasValue).IsTrue(); + Check.That(description.Value.Collection).IsEqualTo(unDoCollection); + Check.That(description.Value.Action).IsEqualTo(UnDoCollectionAction.ISetUnionWith); + Check.That(description.Value.Parameters.Length).IsEqualTo(1); + Check.That(description.Value.Parameters[0]).IsEqualTo(other); + } +} diff --git a/source/DefaultUnDo.Test/ListUnDoTest.cs b/source/DefaultUnDo.Test/ListUnDoTest.cs deleted file mode 100644 index c76a864..0000000 --- a/source/DefaultUnDo.Test/ListUnDoTest.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class ListUnDoTest -{ - [Fact] - public void ListUnDo_Should_throw_ArgumentNullException_When_source_is_null() - { - Check - .ThatCode(() => new ListUnDo(null, 0, null, false)) - .Throws() - .WithProperty("ParamName", "source"); - } - - [Fact] - public void Do_Should_insert_element_to_source_When_isAdd_is_true() - { - const int index = 42; - object value = new(); - IList source = Substitute.For>(); - IUnDo undo = new ListUnDo(source, index, value, true); - - bool done = false; - - source.When(s => s.Insert(index, value)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Do_Should_remove_element_from_source_When_isAdd_is_false() - { - const int index = 42; - object value = new(); - IList source = Substitute.For>(); - IUnDo undo = new ListUnDo(source, index, value, false); - - bool done = false; - - source.When(s => s.RemoveAt(index)).Do(_ => done = true); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_remove_element_from_source_When_isAdd_is_true() - { - const int index = 42; - object value = new(); - IList source = Substitute.For>(); - IUnDo undo = new ListUnDo(source, index, value, true); - - bool done = false; - - source.When(s => s.RemoveAt(index)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_insert_element_to_source_When_isAdd_is_false() - { - const int index = 42; - object value = new(); - IList source = Substitute.For>(); - IUnDo undo = new ListUnDo(source, index, value, false); - - bool done = false; - - source.When(s => s.Insert(index, value)).Do(_ => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Description_Should_return_description() - { - IUnDo undo = new ListUnDo("test", Substitute.For>(), 0, null, true); - - Check.That(undo.Description).IsEqualTo("test"); - } -} diff --git a/source/DefaultUnDo.Test/ListUnDoTests/ConstructorShould.cs b/source/DefaultUnDo.Test/ListUnDoTests/ConstructorShould.cs new file mode 100644 index 0000000..68efc8d --- /dev/null +++ b/source/DefaultUnDo.Test/ListUnDoTests/ConstructorShould.cs @@ -0,0 +1,17 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.ListUnDoTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSourceIsNull() + { + Check + .ThatCode(() => new ListUnDo(null, 0, null, false)) + .Throws() + .WithProperty("ParamName", "source"); + } +} diff --git a/source/DefaultUnDo.Test/ListUnDoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/ListUnDoTests/DescriptionShould.cs new file mode 100644 index 0000000..ff25f93 --- /dev/null +++ b/source/DefaultUnDo.Test/ListUnDoTests/DescriptionShould.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.ListUnDoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + IUnDo undo = new ListUnDo("test", Substitute.For>(), 0, null, true); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/ListUnDoTests/DoShould.cs b/source/DefaultUnDo.Test/ListUnDoTests/DoShould.cs new file mode 100644 index 0000000..bd54cb7 --- /dev/null +++ b/source/DefaultUnDo.Test/ListUnDoTests/DoShould.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.ListUnDoTests; + +public sealed class DoShould +{ + [Fact] + public void InsertElementToSourceWhenIsAddIsTrue() + { + const int index = 42; + object value = new(); + IList source = Substitute.For>(); + IUnDo undo = new ListUnDo(source, index, value, true); + + bool done = false; + + source.When(s => s.Insert(index, value)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void RemoveElementFromSourceWhenIsAddIsFalse() + { + const int index = 42; + object value = new(); + IList source = Substitute.For>(); + IUnDo undo = new ListUnDo(source, index, value, false); + + bool done = false; + + source.When(s => s.RemoveAt(index)).Do(_ => done = true); + + undo.Do(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/ListUnDoTests/UndoShould.cs b/source/DefaultUnDo.Test/ListUnDoTests/UndoShould.cs new file mode 100644 index 0000000..2dc571b --- /dev/null +++ b/source/DefaultUnDo.Test/ListUnDoTests/UndoShould.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.ListUnDoTests; + +public sealed class UndoShould +{ + [Fact] + public void RemoveElementFromSourceWhenIsAddIsTrue() + { + const int index = 42; + object value = new(); + IList source = Substitute.For>(); + IUnDo undo = new ListUnDo(source, index, value, true); + + bool done = false; + + source.When(s => s.RemoveAt(index)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } + + [Fact] + public void InsertElementToSourceWhenIsAddIsFalse() + { + const int index = 42; + object value = new(); + IList source = Substitute.For>(); + IUnDo undo = new ListUnDo(source, index, value, false); + + bool done = false; + + source.When(s => s.Insert(index, value)).Do(_ => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoFieldTests/ConstructorShould.cs b/source/DefaultUnDo.Test/UnDoFieldTests/ConstructorShould.cs new file mode 100644 index 0000000..b697203 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoFieldTests/ConstructorShould.cs @@ -0,0 +1,17 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoFieldTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenManagerIsNull() + { + Check + .ThatCode(() => new UnDoField(null)) + .Throws() + .WithProperty("ParamName", "manager"); + } +} diff --git a/source/DefaultUnDo.Test/UnDoFieldTests/ImplicitOperatorShould.cs b/source/DefaultUnDo.Test/UnDoFieldTests/ImplicitOperatorShould.cs new file mode 100644 index 0000000..73ccea2 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoFieldTests/ImplicitOperatorShould.cs @@ -0,0 +1,25 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoFieldTests; + +public sealed class ImplicitOperatorShould +{ + [Fact] + public void ReturnValue() + { + IUnDoManager manager = Substitute.For(); + + const int value = 42; + int currentValue = new UnDoField(manager, value); + + Check.That(currentValue).IsEqualTo(value); + } + + [Fact] + public void ReturnDefaultWhenNull() + { + Check.That(default).IsEqualTo((int)default(UnDoField)); + } +} diff --git a/source/DefaultUnDo.Test/UnDoFieldTest.cs b/source/DefaultUnDo.Test/UnDoFieldTests/ValueShould.cs similarity index 52% rename from source/DefaultUnDo.Test/UnDoFieldTest.cs rename to source/DefaultUnDo.Test/UnDoFieldTests/ValueShould.cs index 17866ce..2b09ef0 100644 --- a/source/DefaultUnDo.Test/UnDoFieldTest.cs +++ b/source/DefaultUnDo.Test/UnDoFieldTests/ValueShould.cs @@ -1,23 +1,14 @@ -using System; +using DefaultUnDo; using NFluent; using NSubstitute; using Xunit; -namespace DefaultUnDo; +namespace DefaultUnDo.UnDoFieldTests; -public sealed class UnDoFieldTest +public sealed class ValueShould { [Fact] - public void UnDoField_Should_throw_ArgumentNullException_When_manager_is_null() - { - Check - .ThatCode(() => new UnDoField(null)) - .Throws() - .WithProperty("ParamName", "manager"); - } - - [Fact] - public void Value_Should_set_value() + public void SetValue() { IUnDoManager manager = Substitute.For(); manager.Do(Arg.Do(i => i.Do())); @@ -34,7 +25,7 @@ public void Value_Should_set_value() } [Fact] - public void Value_Should_generate_description() + public void GenerateDescription() { IUnDoManager manager = Substitute.For(); manager.Do(Arg.Do(i => i.Do())); @@ -51,21 +42,4 @@ public void Value_Should_generate_description() Check.That(description.Value.OldValue).IsNull(); Check.That(description.Value.NewValue).IsEqualTo(value); } - - [Fact] - public void Implicit_Should_return_value() - { - IUnDoManager manager = Substitute.For(); - - const int value = 42; - int currentValue = new UnDoField(manager, value); - - Check.That(currentValue).IsEqualTo(value); - } - - [Fact] - public void Implicit_Should_return_default_When_null() - { - Check.That(default).IsEqualTo((int)default(UnDoField)); - } } diff --git a/source/DefaultUnDo.Test/UnDoManagerTest.cs b/source/DefaultUnDo.Test/UnDoManagerTest.cs deleted file mode 100644 index 12f7cc1..0000000 --- a/source/DefaultUnDo.Test/UnDoManagerTest.cs +++ /dev/null @@ -1,516 +0,0 @@ -using System; -using System.Collections.Generic; -using NFluent; -using NSubstitute; -using Xunit; - -namespace DefaultUnDo; - -public sealed class UnDoManagerTest -{ - public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); - - [Fact] - public void UnDoManager_maxCapacity_Should_throw_ArgumentException_When_maxCapacity_is_inferior_or_equal_to_zero() - { - Check.ThatCode(() => new UnDoManager(-1)).Throws(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Version_Should_incremente_When_a_command_is_done(IUnDoManager manager) - { - int oldVersion = manager.Version; - - manager.Do(Substitute.For()); - - Check.That(manager.Version).IsStrictlyGreaterThan(oldVersion); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Version_Should_return_old_value_When_a_command_is_undone(IUnDoManager manager) - { - int oldVersion = manager.Version; - - manager.Do(Substitute.For()); - manager.Undo(); - - Check.That(manager.Version).IsEqualTo(oldVersion); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Version_Should_return_last_value_When_a_command_is_redone(IUnDoManager manager) - { - manager.Do(Substitute.For()); - - int lastVersion = manager.Version; - - manager.Undo(); - manager.Redo(); - - Check.That(manager.Version).IsEqualTo(lastVersion); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanUndo_Should_return_false_When_no_command_has_been_done(IUnDoManager manager) - { - Check.That(manager.CanUndo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanUndo_Should_return_true_When_a_command_has_been_done(IUnDoManager manager) - { - manager.Do(Substitute.For()); - - Check.That(manager.CanUndo).IsTrue(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanUndo_Should_return_false_When_all_commands_have_been_undone(IUnDoManager manager) - { - manager.Do(Substitute.For()); - manager.Undo(); - - Check.That(manager.CanUndo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanRedo_Should_return_false_When_no_command_has_been_done(IUnDoManager manager) - { - Check.That(manager.CanRedo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanRedo_Should_return_true_When_a_command_has_been_undone(IUnDoManager manager) - { - manager.Do(Substitute.For()); - manager.Undo(); - - Check.That(manager.CanRedo).IsTrue(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void CanRedo_Should_return_false_When_all_commands_have_been_redone(IUnDoManager manager) - { - manager.Do(Substitute.For()); - manager.Undo(); - manager.Redo(); - - Check.That(manager.CanRedo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Clear_Should_clear_undone_and_done_history(IUnDoManager manager) - { - manager.Do(Substitute.For()); - manager.Do(Substitute.For()); - manager.Undo(); - - Check.That(manager.CanUndo).IsTrue(); - Check.That(manager.CanRedo).IsTrue(); - - manager.Clear(); - - Check.That(manager.CanUndo).IsFalse(); - Check.That(manager.CanRedo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Clear_Should_throw_When_a_transaction_is_going_on(IUnDoManager manager) - { - IUnDoTransaction transaction = manager.BeginTransaction(); - - Check.ThatCode(manager.Clear).Throws(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Do_Should_throw_ArgumentNullException_When_command_is_null(IUnDoManager manager) - { - Check - .ThatCode(() => manager.Do(null)) - .Throws() - .WithProperty("ParamName", "command"); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Do_Should_Do(IUnDoManager manager) - { - IUnDo undo = Substitute.For(); - - bool done = false; - undo.When(u => u.Do()).Do(_ => done = true); - - manager.Do(undo); - - Check.That(done).IsTrue(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Do_Should_merge_When_possible(IUnDoManager manager) - { - IMergeableUnDo mergeable = Substitute.For(); - IUnDo undo = Substitute.For(); - IUnDo merged = Substitute.For(); - merged.Description.Returns("yay"); - - mergeable.TryMerge(undo, out Arg.Any()).Returns(x => - { - x[1] = merged; - return true; - }); - - manager.Do(mergeable); - manager.Do(undo); - - Check.That(manager.UndoDescriptions).ContainsExactly("yay"); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Do_Should_not_add_command_in_history_when_a_group_is_going_on(IUnDoManager manager) - { - IUnDo undo = Substitute.For(); - int version = manager.Version; - - using (manager.BeginTransaction()) - { - manager.Do(undo); - - Check.That(manager.Version).IsEqualTo(version); - } - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void BeginTransaction_Should_return_an_IDisposable(IUnDoManager manager) - { - Check.That(manager.BeginTransaction()).IsNotNull(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void BeginTransaction_Should_add_commands_as_one_operation_in_history_once_disposed(IUnDoManager manager) - { - IUnDo undo = Substitute.For(); - undo.Description.Returns("dummy"); - int version = manager.Version; - - using (IUnDoTransaction t1 = manager.BeginTransaction("first")) - using (IUnDoTransaction t2 = manager.BeginTransaction("second")) - { - manager.Do(undo); - manager.Do(undo); - - t2.Commit(); - t1.Commit(); - } - - Check.That(manager.Version).IsStrictlyGreaterThan(version); - Check.That(manager.UndoDescriptions).ContainsExactly("first"); - - manager.Undo(); - - Check.That(manager.Version).IsEqualTo(version); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Do_Should_clear_undone_history(IUnDoManager manager) - { - manager.Do(Substitute.For()); - manager.Do(Substitute.For()); - manager.Undo(); - - Check.That(manager.CanRedo).IsTrue(); - - manager.Do(Substitute.For()); - - Check.That(manager.CanRedo).IsFalse(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Undo_Should_throw_InvalidOperationException_When_CanUndo_is_false(IUnDoManager manager) - { - Check - .ThatCode(manager.Undo) - .Throws(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Undo_Should_throw_InvalidOperationException_When_a_transaction_is_going_on(IUnDoManager manager) - { - using (manager.BeginTransaction()) - { - Check - .ThatCode(manager.Undo) - .Throws() - .WithMessage("Cannot perform Undo while a transaction is going on."); - } - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Undo_Should_Undo(IUnDoManager manager) - { - IUnDo undo = Substitute.For(); - - bool done = false; - undo.When(u => u.Undo()).Do(_ => done = true); - - manager.Do(undo); - manager.Undo(); - - Check.That(done).IsTrue(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Redo_Should_throw_InvalidOperationException_When_CanRedo_is_false(IUnDoManager manager) - { - Check - .ThatCode(manager.Redo) - .Throws(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Redo_Should_throw_InvalidOperationException_When_a_transaction_is_going_on(IUnDoManager manager) - { - using (manager.BeginTransaction()) - { - Check - .ThatCode(manager.Redo) - .Throws() - .WithMessage("Cannot perform Redo while a transaction is going on."); - } - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void Redo_Should_Redo(IUnDoManager manager) - { - IUnDo undo = Substitute.For(); - - manager.Do(undo); - manager.Undo(); - - bool done = false; - undo.When(u => u.Do()).Do(_ => done = true); - - manager.Redo(); - - Check.That(done).IsTrue(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void PropertyChanged_Should_be_called(IUnDoManager manager) - { - List properties = []; - manager.PropertyChanged += (_, e) => properties.Add(e.PropertyName); - - manager.Do(() => { }, () => { }); - - Check.That(properties).Contains(nameof(manager.Version), nameof(manager.CanUndo), nameof(manager.CanRedo), nameof(manager.UndoDescriptions), nameof(manager.RedoDescriptions)); - - properties.Clear(); - - manager.Clear(); - - Check.That(properties).Contains(nameof(manager.CanUndo), nameof(manager.CanRedo), nameof(manager.UndoDescriptions), nameof(manager.RedoDescriptions)); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void UndoDescriptions_Should_return_descriptions_of_undoable_operations(IUnDoManager manager) - { - IUnDo operation1 = Substitute.For(); - IUnDo operation2 = Substitute.For(); - - operation1.Description.Returns("kikoo"); - operation2.Description.Returns("lol"); - - manager.Do(operation1); - manager.Do(operation2); - - Check.That(manager.UndoDescriptions).ContainsExactly("lol", "kikoo"); - - manager.Undo(); - manager.Undo(); - - Check.That(manager.UndoDescriptions).IsEmpty(); - } - - [Theory] - [MemberData(nameof(UnDoManagers))] - public void RedoDescriptions_Should_return_descriptions_of_redoable_operations(IUnDoManager manager) - { - IUnDo operation1 = Substitute.For(); - IUnDo operation2 = Substitute.For(); - - operation1.Description.Returns("kikoo"); - operation2.Description.Returns("lol"); - - manager.Do(operation1); - manager.Do(operation2); - - Check.That(manager.RedoDescriptions).IsEmpty(); - - manager.Undo(); - manager.Undo(); - - Check.That(manager.RedoDescriptions).ContainsExactly("kikoo", "lol"); - } - - [Fact] - public void Do_Should_override_oldest_operation_When_max_capacity() - { - IUnDoManager manager = new UnDoManager(2); - - IUnDo operation1 = Substitute.For(); - IUnDo operation2 = Substitute.For(); - IUnDo operation3 = Substitute.For(); - - operation1.Description.Returns("un"); - operation2.Description.Returns("dos"); - operation3.Description.Returns("tres"); - - manager.Do(operation1); - manager.Do(operation2); - manager.Do(operation3); - - Check.That(manager.UndoDescriptions).ContainsExactly("tres", "dos"); - - manager.Undo(); - manager.Undo(); - - Check.That(manager.RedoDescriptions).ContainsExactly("dos", "tres"); - - manager.Redo(); - manager.Redo(); - - Check.That(manager.UndoDescriptions).ContainsExactly("tres", "dos"); - } - - [Fact] - public void Do_Should_operation_When_max_capacity_is_one() - { - IUnDoManager manager = new UnDoManager(1); - - IUnDo operation1 = Substitute.For(); - IUnDo operation2 = Substitute.For(); - - operation1.Description.Returns("kikoo"); - operation2.Description.Returns("lol"); - - manager.Do(operation1); - manager.Do(operation2); - - Check.That(manager.UndoDescriptions).ContainsExactly("lol"); - Check.That(manager.RedoDescriptions).IsEmpty(); - - manager.Undo(); - - Check.That(manager.UndoDescriptions).IsEmpty(); - Check.That(manager.RedoDescriptions).ContainsExactly("lol"); - } - - [Fact] - public void IUnDoTransactionCommit_Should_throw_When_already_disposed() - { - IUnDoManager manager = new UnDoManager(1); - - IUnDoTransaction transaction = manager.BeginTransaction(); - - transaction.Dispose(); - - Check.ThatCode(transaction.Commit).Throws(); - } - - [Fact] - public void IUnDoTransactionCommit_Should_throw_When_already_committed() - { - IUnDoManager manager = new UnDoManager(1); - - IUnDoTransaction transaction = manager.BeginTransaction(); - - transaction.Commit(); - - Check.ThatCode(transaction.Commit).Throws(); - } - - [Fact] - public void IUnDoTransactionCommit_Should_throw_When_not_the_latest_transaction() - { - IUnDoManager manager = new UnDoManager(1); - - IUnDoTransaction transaction1 = manager.BeginTransaction(); - IUnDoTransaction transaction2 = manager.BeginTransaction(); - - Check.ThatCode(transaction1.Commit).Throws(); - } - - [Fact] - public void IUnDoTransactionDispose_Should_throw_When_not_the_latest_transaction() - { - IUnDoManager manager = new UnDoManager(1); - - IUnDoTransaction transaction1 = manager.BeginTransaction(); - IUnDoTransaction transaction2 = manager.BeginTransaction(); - - Check.ThatCode(transaction1.Dispose).Throws(); - } - - [Fact] - public void IUnDoTransactionDispose_Should_not_undo_When_committed() - { - IUnDoManager manager = new UnDoManager(1); - - bool unDone = false; - - using (IUnDoTransaction transaction = manager.BeginTransaction()) - { - IUnDo undo = Substitute.For(); - undo.When(u => u.Undo()).Do(_ => unDone = true); - - manager.Do(undo); - - transaction.Commit(); - } - - Check.That(unDone).IsFalse(); - } - - [Fact] - public void IUnDoTransactionDispose_Should_undo_When_not_committed() - { - IUnDoManager manager = new UnDoManager(1); - - bool unDone = false; - - using (IUnDoTransaction transaction = manager.BeginTransaction()) - { - IUnDo undo = Substitute.For(); - undo.When(u => u.Undo()).Do(_ => unDone = true); - - manager.Do(undo); - } - - Check.That(unDone).IsTrue(); - } -} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/BeginTransactionShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/BeginTransactionShould.cs new file mode 100644 index 0000000..d25a2b1 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/BeginTransactionShould.cs @@ -0,0 +1,16 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class BeginTransactionShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnAnIDisposable(IUnDoManager manager) + { + Check.That(manager.BeginTransaction()).IsNotNull(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/CanRedoShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/CanRedoShould.cs new file mode 100644 index 0000000..0574d4e --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/CanRedoShould.cs @@ -0,0 +1,38 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class CanRedoShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnFalseWhenNoCommandHasBeenDone(IUnDoManager manager) + { + Check.That(manager.CanRedo).IsFalse(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnTrueWhenACommandHasBeenUndone(IUnDoManager manager) + { + manager.Do(Substitute.For()); + manager.Undo(); + + Check.That(manager.CanRedo).IsTrue(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnFalseWhenAllCommandsHaveBeenRedone(IUnDoManager manager) + { + manager.Do(Substitute.For()); + manager.Undo(); + manager.Redo(); + + Check.That(manager.CanRedo).IsFalse(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/CanUndoShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/CanUndoShould.cs new file mode 100644 index 0000000..6e03255 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/CanUndoShould.cs @@ -0,0 +1,36 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class CanUndoShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnFalseWhenNoCommandHasBeenDone(IUnDoManager manager) + { + Check.That(manager.CanUndo).IsFalse(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnTrueWhenACommandHasBeenDone(IUnDoManager manager) + { + manager.Do(Substitute.For()); + + Check.That(manager.CanUndo).IsTrue(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnFalseWhenAllCommandsHaveBeenUndone(IUnDoManager manager) + { + manager.Do(Substitute.For()); + manager.Undo(); + + Check.That(manager.CanUndo).IsFalse(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/ClearShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/ClearShould.cs new file mode 100644 index 0000000..163ade0 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/ClearShould.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class ClearShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ClearUndoneAndDoneHistory(IUnDoManager manager) + { + manager.Do(Substitute.For()); + manager.Do(Substitute.For()); + manager.Undo(); + + Check.That(manager.CanUndo).IsTrue(); + Check.That(manager.CanRedo).IsTrue(); + + manager.Clear(); + + Check.That(manager.CanUndo).IsFalse(); + Check.That(manager.CanRedo).IsFalse(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowWhenATransactionIsGoingOn(IUnDoManager manager) + { + IUnDoTransaction transaction = manager.BeginTransaction(); + + Check.ThatCode(manager.Clear).Throws(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void CallPropertyChanged(IUnDoManager manager) + { + List properties = []; + + manager.Do(() => { }, () => { }); + + manager.PropertyChanged += (_, e) => properties.Add(e.PropertyName); + + manager.Clear(); + + Check.That(properties).Contains(nameof(manager.CanUndo), nameof(manager.CanRedo), nameof(manager.UndoDescriptions), nameof(manager.RedoDescriptions)); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/ConstructorShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/ConstructorShould.cs new file mode 100644 index 0000000..32d1814 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/ConstructorShould.cs @@ -0,0 +1,14 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentExceptionWhenMaxCapacityIsInferiorOrEqualToZero() + { + Check.ThatCode(() => new UnDoManager(-1)).Throws(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/DoShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/DoShould.cs new file mode 100644 index 0000000..6dd56d6 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/DoShould.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class DoShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowArgumentNullExceptionWhenCommandIsNull(IUnDoManager manager) + { + Check + .ThatCode(() => manager.Do(null)) + .Throws() + .WithProperty("ParamName", "command"); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void Do(IUnDoManager manager) + { + IUnDo undo = Substitute.For(); + + bool done = false; + undo.When(u => u.Do()).Do(_ => done = true); + + manager.Do(undo); + + Check.That(done).IsTrue(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void MergeWhenPossible(IUnDoManager manager) + { + IMergeableUnDo mergeable = Substitute.For(); + IUnDo undo = Substitute.For(); + IUnDo merged = Substitute.For(); + merged.Description.Returns("yay"); + + mergeable.TryMerge(undo, out Arg.Any()).Returns(x => + { + x[1] = merged; + return true; + }); + + manager.Do(mergeable); + manager.Do(undo); + + Check.That(manager.UndoDescriptions).ContainsExactly("yay"); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void NotAddCommandInHistoryWhenAGroupIsGoingOn(IUnDoManager manager) + { + IUnDo undo = Substitute.For(); + int version = manager.Version; + + using (manager.BeginTransaction()) + { + manager.Do(undo); + + Check.That(manager.Version).IsEqualTo(version); + } + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ClearUndoneHistory(IUnDoManager manager) + { + manager.Do(Substitute.For()); + manager.Do(Substitute.For()); + manager.Undo(); + + Check.That(manager.CanRedo).IsTrue(); + + manager.Do(Substitute.For()); + + Check.That(manager.CanRedo).IsFalse(); + } + + [Fact] + public void OverrideOldestOperationWhenMaxCapacity() + { + IUnDoManager manager = new UnDoManager(2); + + IUnDo operation1 = Substitute.For(); + IUnDo operation2 = Substitute.For(); + IUnDo operation3 = Substitute.For(); + + operation1.Description.Returns("un"); + operation2.Description.Returns("dos"); + operation3.Description.Returns("tres"); + + manager.Do(operation1); + manager.Do(operation2); + manager.Do(operation3); + + Check.That(manager.UndoDescriptions).ContainsExactly("tres", "dos"); + + manager.Undo(); + manager.Undo(); + + Check.That(manager.RedoDescriptions).ContainsExactly("dos", "tres"); + + manager.Redo(); + manager.Redo(); + + Check.That(manager.UndoDescriptions).ContainsExactly("tres", "dos"); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void CallPropertyChanged(IUnDoManager manager) + { + List properties = []; + manager.PropertyChanged += (_, e) => properties.Add(e.PropertyName); + + manager.Do(() => { }, () => { }); + + Check.That(properties).Contains(nameof(manager.Version), nameof(manager.CanUndo), nameof(manager.CanRedo), nameof(manager.UndoDescriptions), nameof(manager.RedoDescriptions)); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/RedoDescriptionsShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/RedoDescriptionsShould.cs new file mode 100644 index 0000000..8ba45ea --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/RedoDescriptionsShould.cs @@ -0,0 +1,31 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class RedoDescriptionsShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnDescriptionsOfRedoableOperations(IUnDoManager manager) + { + IUnDo operation1 = Substitute.For(); + IUnDo operation2 = Substitute.For(); + + operation1.Description.Returns("kikoo"); + operation2.Description.Returns("lol"); + + manager.Do(operation1); + manager.Do(operation2); + + Check.That(manager.RedoDescriptions).IsEmpty(); + + manager.Undo(); + manager.Undo(); + + Check.That(manager.RedoDescriptions).ContainsExactly("kikoo", "lol"); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/RedoShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/RedoShould.cs new file mode 100644 index 0000000..a553c75 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/RedoShould.cs @@ -0,0 +1,50 @@ +using System; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class RedoShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowInvalidOperationExceptionWhenCanRedoIsFalse(IUnDoManager manager) + { + Check + .ThatCode(manager.Redo) + .Throws(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowInvalidOperationExceptionWhenATransactionIsGoingOn(IUnDoManager manager) + { + using (manager.BeginTransaction()) + { + Check + .ThatCode(manager.Redo) + .Throws() + .WithMessage("Cannot perform Redo while a transaction is going on."); + } + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void Redo(IUnDoManager manager) + { + IUnDo undo = Substitute.For(); + + manager.Do(undo); + manager.Undo(); + + bool done = false; + undo.When(u => u.Do()).Do(_ => done = true); + + manager.Redo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/CommitShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/CommitShould.cs new file mode 100644 index 0000000..cab62f1 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/CommitShould.cs @@ -0,0 +1,72 @@ +using System; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests.TransactionTests; + +public sealed class CommitShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void AddCommandsAsOneOperationInHistory(IUnDoManager manager) + { + IUnDo undo = Substitute.For(); + undo.Description.Returns("dummy"); + int version = manager.Version; + + using (IUnDoTransaction t1 = manager.BeginTransaction("first")) + using (IUnDoTransaction t2 = manager.BeginTransaction("second")) + { + manager.Do(undo); + manager.Do(undo); + + t2.Commit(); + t1.Commit(); + } + + Check.That(manager.Version).IsStrictlyGreaterThan(version); + Check.That(manager.UndoDescriptions).ContainsExactly("first"); + + manager.Undo(); + + Check.That(manager.Version).IsEqualTo(version); + } + + [Fact] + public void ThrowWhenAlreadyDisposed() + { + IUnDoManager manager = new UnDoManager(1); + + IUnDoTransaction transaction = manager.BeginTransaction(); + + transaction.Dispose(); + + Check.ThatCode(transaction.Commit).Throws(); + } + + [Fact] + public void ThrowWhenAlreadyCommitted() + { + IUnDoManager manager = new UnDoManager(1); + + IUnDoTransaction transaction = manager.BeginTransaction(); + + transaction.Commit(); + + Check.ThatCode(transaction.Commit).Throws(); + } + + [Fact] + public void ThrowWhenNotTheLatestTransaction() + { + IUnDoManager manager = new UnDoManager(1); + + IUnDoTransaction transaction1 = manager.BeginTransaction(); + IUnDoTransaction transaction2 = manager.BeginTransaction(); + + Check.ThatCode(transaction1.Commit).Throws(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/DisposeShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/DisposeShould.cs new file mode 100644 index 0000000..9ad027c --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/TransactionTests/DisposeShould.cs @@ -0,0 +1,60 @@ +using System; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests.TransactionTests; + +public sealed class DisposeShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Fact] + public void ThrowWhenNotTheLatestTransaction() + { + IUnDoManager manager = new UnDoManager(1); + + IUnDoTransaction transaction1 = manager.BeginTransaction(); + IUnDoTransaction transaction2 = manager.BeginTransaction(); + + Check.ThatCode(transaction1.Dispose).Throws(); + } + + [Fact] + public void NotUndoWhenCommitted() + { + IUnDoManager manager = new UnDoManager(1); + + bool unDone = false; + + using (IUnDoTransaction transaction = manager.BeginTransaction()) + { + IUnDo undo = Substitute.For(); + undo.When(u => u.Undo()).Do(_ => unDone = true); + + manager.Do(undo); + + transaction.Commit(); + } + + Check.That(unDone).IsFalse(); + } + + [Fact] + public void UndoWhenNotCommitted() + { + IUnDoManager manager = new UnDoManager(1); + + bool unDone = false; + + using (IUnDoTransaction transaction = manager.BeginTransaction()) + { + IUnDo undo = Substitute.For(); + undo.When(u => u.Undo()).Do(_ => unDone = true); + + manager.Do(undo); + } + + Check.That(unDone).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/UndoDescriptionsShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/UndoDescriptionsShould.cs new file mode 100644 index 0000000..3cdbbab --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/UndoDescriptionsShould.cs @@ -0,0 +1,31 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class UndoDescriptionsShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnDescriptionsOfUndoableOperations(IUnDoManager manager) + { + IUnDo operation1 = Substitute.For(); + IUnDo operation2 = Substitute.For(); + + operation1.Description.Returns("kikoo"); + operation2.Description.Returns("lol"); + + manager.Do(operation1); + manager.Do(operation2); + + Check.That(manager.UndoDescriptions).ContainsExactly("lol", "kikoo"); + + manager.Undo(); + manager.Undo(); + + Check.That(manager.UndoDescriptions).IsEmpty(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/UndoShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/UndoShould.cs new file mode 100644 index 0000000..c4e90d3 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/UndoShould.cs @@ -0,0 +1,48 @@ +using System; +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class UndoShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowInvalidOperationExceptionWhenCanUndoIsFalse(IUnDoManager manager) + { + Check + .ThatCode(manager.Undo) + .Throws(); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ThrowInvalidOperationExceptionWhenATransactionIsGoingOn(IUnDoManager manager) + { + using (manager.BeginTransaction()) + { + Check + .ThatCode(manager.Undo) + .Throws() + .WithMessage("Cannot perform Undo while a transaction is going on."); + } + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void Undo(IUnDoManager manager) + { + IUnDo undo = Substitute.For(); + + bool done = false; + undo.When(u => u.Undo()).Do(_ => done = true); + + manager.Do(undo); + manager.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoManagerTests/VersionShould.cs b/source/DefaultUnDo.Test/UnDoManagerTests/VersionShould.cs new file mode 100644 index 0000000..dfa40e7 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoManagerTests/VersionShould.cs @@ -0,0 +1,47 @@ +using NFluent; +using NSubstitute; +using Xunit; + +namespace DefaultUnDo.UnDoManagerTests; + +public sealed class VersionShould +{ + public static TheoryData UnDoManagers => new(new UnDoManager(), new UnDoManager(10)); + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void IncrementeWhenACommandIsDone(IUnDoManager manager) + { + int oldVersion = manager.Version; + + manager.Do(Substitute.For()); + + Check.That(manager.Version).IsStrictlyGreaterThan(oldVersion); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnOldValueWhenACommandIsUndone(IUnDoManager manager) + { + int oldVersion = manager.Version; + + manager.Do(Substitute.For()); + manager.Undo(); + + Check.That(manager.Version).IsEqualTo(oldVersion); + } + + [Theory] + [MemberData(nameof(UnDoManagers))] + public void ReturnLastValueWhenACommandIsRedone(IUnDoManager manager) + { + manager.Do(Substitute.For()); + + int lastVersion = manager.Version; + + manager.Undo(); + manager.Redo(); + + Check.That(manager.Version).IsEqualTo(lastVersion); + } +} diff --git a/source/DefaultUnDo.Test/UnDoTest.cs b/source/DefaultUnDo.Test/UnDoTest.cs deleted file mode 100644 index 0fc41d7..0000000 --- a/source/DefaultUnDo.Test/UnDoTest.cs +++ /dev/null @@ -1,57 +0,0 @@ -using NFluent; -using Xunit; - -namespace DefaultUnDo; - -public sealed class UnDoTest -{ - [Fact] - public void Do_Should_not_throw_When_doAction_is_null() - { - IUnDo undo = new UnDo(null, null); - - Check - .ThatCode(undo.Do) - .DoesNotThrow(); - } - - [Fact] - public void Undo_Should_not_throw_When_undoAction_is_null() - { - IUnDo undo = new UnDo(null, null); - - Check - .ThatCode(undo.Undo) - .DoesNotThrow(); - } - - [Fact] - public void Do_Should_do_doAction() - { - bool done = false; - IUnDo undo = new UnDo(() => done = true, null); - - undo.Do(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Undo_Should_do_undoAction() - { - bool done = false; - IUnDo undo = new UnDo(null, () => done = true); - - undo.Undo(); - - Check.That(done).IsTrue(); - } - - [Fact] - public void Description_Should_return_description() - { - IUnDo undo = new UnDo("test", null, null); - - Check.That(undo.Description).IsEqualTo("test"); - } -} diff --git a/source/DefaultUnDo.Test/UnDoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/UnDoTests/DescriptionShould.cs new file mode 100644 index 0000000..1542274 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoTests/DescriptionShould.cs @@ -0,0 +1,15 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + IUnDo undo = new UnDo("test", null, null); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/UnDoTests/DoShould.cs b/source/DefaultUnDo.Test/UnDoTests/DoShould.cs new file mode 100644 index 0000000..c60a75e --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoTests/DoShould.cs @@ -0,0 +1,29 @@ +using DefaultUnDo; +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoTests; + +public sealed class DoShould +{ + [Fact] + public void NotThrowWhenDoActionIsNull() + { + IUnDo undo = new UnDo(null, null); + + Check + .ThatCode(undo.Do) + .DoesNotThrow(); + } + + [Fact] + public void DoDoAction() + { + bool done = false; + IUnDo undo = new UnDo(() => done = true, null); + + undo.Do(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/UnDoTests/UndoShould.cs b/source/DefaultUnDo.Test/UnDoTests/UndoShould.cs new file mode 100644 index 0000000..269d6c3 --- /dev/null +++ b/source/DefaultUnDo.Test/UnDoTests/UndoShould.cs @@ -0,0 +1,28 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.UnDoTests; + +public sealed class UndoShould +{ + [Fact] + public void NotThrowWhenUndoActionIsNull() + { + IUnDo undo = new UnDo(null, null); + + Check + .ThatCode(undo.Undo) + .DoesNotThrow(); + } + + [Fact] + public void DoUndoAction() + { + bool done = false; + IUnDo undo = new UnDo(null, () => done = true); + + undo.Undo(); + + Check.That(done).IsTrue(); + } +} diff --git a/source/DefaultUnDo.Test/ValueUnDoTests/ConstructorShould.cs b/source/DefaultUnDo.Test/ValueUnDoTests/ConstructorShould.cs new file mode 100644 index 0000000..8888cb6 --- /dev/null +++ b/source/DefaultUnDo.Test/ValueUnDoTests/ConstructorShould.cs @@ -0,0 +1,17 @@ +using System; +using NFluent; +using Xunit; + +namespace DefaultUnDo.ValueUnDoTests; + +public sealed class ConstructorShould +{ + [Fact] + public void ThrowArgumentNullExceptionWhenSetterIsNull() + { + Check + .ThatCode(() => new ValueUnDo(null, null, null)) + .Throws() + .WithProperty("ParamName", "setter"); + } +} diff --git a/source/DefaultUnDo.Test/ValueUnDoTests/DescriptionShould.cs b/source/DefaultUnDo.Test/ValueUnDoTests/DescriptionShould.cs new file mode 100644 index 0000000..43b6356 --- /dev/null +++ b/source/DefaultUnDo.Test/ValueUnDoTests/DescriptionShould.cs @@ -0,0 +1,15 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.ValueUnDoTests; + +public sealed class DescriptionShould +{ + [Fact] + public void ReturnDescription() + { + IUnDo undo = new ValueUnDo("test", _ => { }, null, null); + + Check.That(undo.Description).IsEqualTo("test"); + } +} diff --git a/source/DefaultUnDo.Test/ValueUnDoTests/DoShould.cs b/source/DefaultUnDo.Test/ValueUnDoTests/DoShould.cs new file mode 100644 index 0000000..afb60a5 --- /dev/null +++ b/source/DefaultUnDo.Test/ValueUnDoTests/DoShould.cs @@ -0,0 +1,20 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.ValueUnDoTests; + +public sealed class DoShould +{ + [Fact] + public void SetNewValue() + { + object value = null; + object oldValue = new(); + object newValue = new(); + IUnDo undo = new ValueUnDo(v => value = v, newValue, oldValue); + + undo.Do(); + + Check.That(value).IsEqualTo(newValue); + } +} diff --git a/source/DefaultUnDo.Test/ValueUnDoTest.cs b/source/DefaultUnDo.Test/ValueUnDoTests/TryMergeShould.cs similarity index 65% rename from source/DefaultUnDo.Test/ValueUnDoTest.cs rename to source/DefaultUnDo.Test/ValueUnDoTests/TryMergeShould.cs index c2b970a..2f762b1 100644 --- a/source/DefaultUnDo.Test/ValueUnDoTest.cs +++ b/source/DefaultUnDo.Test/ValueUnDoTests/TryMergeShould.cs @@ -3,55 +3,12 @@ using NSubstitute; using Xunit; -namespace DefaultUnDo; +namespace DefaultUnDo.ValueUnDoTests; -public sealed class ValueUnDoTest +public sealed class TryMergeShould { [Fact] - public void ValueUnDo_Should_throw_ArgumentNullException_When_setter_is_null() - { - Check - .ThatCode(() => new ValueUnDo(null, null, null)) - .Throws() - .WithProperty("ParamName", "setter"); - } - - [Fact] - public void Do_Should_set_newValue() - { - object value = null; - object oldValue = new(); - object newValue = new(); - IUnDo undo = new ValueUnDo(v => value = v, newValue, oldValue); - - undo.Do(); - - Check.That(value).IsEqualTo(newValue); - } - - [Fact] - public void Undo_Should_set_oldValue() - { - object value = null; - object oldValue = new(); - object newValue = new(); - IUnDo undo = new ValueUnDo(v => value = v, newValue, oldValue); - - undo.Undo(); - - Check.That(value).IsEqualTo(oldValue); - } - - [Fact] - public void Description_Should_return_description() - { - IUnDo undo = new ValueUnDo("test", _ => { }, null, null); - - Check.That(undo.Description).IsEqualTo("test"); - } - - [Fact] - public void TryMerge_Should_return_false_When_other_is_not_ValueUnDo() + public void ReturnFalseWhenOtherIsNotValueUnDo() { IMergeableUnDo value = new ValueUnDo("test", _ => { }, 0, 0); IUnDo undo = Substitute.For(); @@ -61,7 +18,7 @@ public void TryMerge_Should_return_false_When_other_is_not_ValueUnDo() } [Fact] - public void TryMerge_Should_return_false_When_other_is_not_GroupUnDo_with_single_ValueUnDo() + public void ReturnFalseWhenOtherIsNotGroupUnDoWithSingleValueUnDo() { IMergeableUnDo value = new ValueUnDo("test", _ => { }, 0, 0); IUnDo undo = Substitute.For(); @@ -71,7 +28,7 @@ public void TryMerge_Should_return_false_When_other_is_not_GroupUnDo_with_single } [Fact] - public void TryMerge_Should_return_false_When_setter_are_different() + public void ReturnFalseWhenSetterAreDifferent() { IMergeableUnDo value = new ValueUnDo("test", Substitute.For>(), 0, 0); @@ -79,7 +36,7 @@ public void TryMerge_Should_return_false_When_setter_are_different() } [Fact] - public void TryMerge_Should_return_false_When_newValue_and_oldValue_are_different() + public void ReturnFalseWhenNewValueAndOldValueAreDifferent() { Action setter = Substitute.For>(); IMergeableUnDo value = new ValueUnDo("test", setter, 1, 1); @@ -88,7 +45,7 @@ public void TryMerge_Should_return_false_When_newValue_and_oldValue_are_differen } [Fact] - public void TryMerge_Should_return_false_When_timestamp_are_too_far() + public void ReturnFalseWhenTimestampAreTooFar() { Action setter = Substitute.For>(); IMergeableUnDo value = new ValueUnDo("test", setter, 1, 0); @@ -100,7 +57,7 @@ public void TryMerge_Should_return_false_When_timestamp_are_too_far() } [Fact] - public void TryMerge_Should_return_true_When_merged_with_ValueUnDo() + public void ReturnTrueWhenMergedWithValueUnDo() { int item = 0; void setter(int v) => item = v; @@ -116,7 +73,7 @@ public void TryMerge_Should_return_true_When_merged_with_ValueUnDo() } [Fact] - public void TryMerge_Should_use_MergeDescriptionAction_When_Set() + public void UseMergeDescriptionActionWhenSet() { int item = 0; void setter(int v) => item = v; @@ -130,7 +87,7 @@ public void TryMerge_Should_use_MergeDescriptionAction_When_Set() } [Fact] - public void TryMerge_Should_use_non_generic_MergeDescriptionAction_When_Set() + public void UseNonGenericMergeDescriptionActionWhenSet() { int item = 0; void setter(int v) => item = v; @@ -144,7 +101,7 @@ public void TryMerge_Should_use_non_generic_MergeDescriptionAction_When_Set() } [Fact] - public void TryMerge_Should_use_new_description() + public void UseNewDescription() { int item = 0; void setter(int v) => item = v; @@ -155,7 +112,7 @@ public void TryMerge_Should_use_new_description() } [Fact] - public void TryMerge_Should_return_true_When_merged_with_GroupUnDo() + public void ReturnTrueWhenMergedWithGroupUnDo() { int item = 0; void setter(int v) => item = v; diff --git a/source/DefaultUnDo.Test/ValueUnDoTests/UndoShould.cs b/source/DefaultUnDo.Test/ValueUnDoTests/UndoShould.cs new file mode 100644 index 0000000..9e53597 --- /dev/null +++ b/source/DefaultUnDo.Test/ValueUnDoTests/UndoShould.cs @@ -0,0 +1,20 @@ +using NFluent; +using Xunit; + +namespace DefaultUnDo.ValueUnDoTests; + +public sealed class UndoShould +{ + [Fact] + public void SetOldValue() + { + object value = null; + object oldValue = new(); + object newValue = new(); + IUnDo undo = new ValueUnDo(v => value = v, newValue, oldValue); + + undo.Undo(); + + Check.That(value).IsEqualTo(oldValue); + } +} diff --git a/source/DefaultUnDo/DefaultDocumentation.json b/source/DefaultUnDo/DefaultDocumentation.json index 1a1c794..644215f 100644 --- a/source/DefaultUnDo/DefaultDocumentation.json +++ b/source/DefaultUnDo/DefaultDocumentation.json @@ -2,9 +2,16 @@ "OutputDirectoryPath": "..\\..\\documentation\\api", "GeneratedAccessModifiers": "Public,Protected,ProtectedInternal", "GeneratedPages": "Assembly,Types,Members", - "FileNameFactory": "Name", + "FileNameFactory": "DirectoryName", "LinksOutputFilePath": "..\\..\\documentation\\DefaultUnDo.txt", "LinksBaseUrl": "https://github.com/Doraku/DefaultUnDo/blob/master/documentation/api/", + "AssemblyDocItem": { + "Sections": [ + "Header", + "Default", + "Footer" + ] + }, "NamespaceDocItem": { "Sections": [ "Title", diff --git a/source/DefaultUnDo/DefaultUnDo.csproj b/source/DefaultUnDo/DefaultUnDo.csproj index 661538a..eebf6b1 100644 --- a/source/DefaultUnDo/DefaultUnDo.csproj +++ b/source/DefaultUnDo/DefaultUnDo.csproj @@ -16,7 +16,7 @@ - + diff --git a/source/DefaultUnDo/ICollectionExtension.cs b/source/DefaultUnDo/Extensions/ICollectionExtensions.cs similarity index 97% rename from source/DefaultUnDo/ICollectionExtension.cs rename to source/DefaultUnDo/Extensions/ICollectionExtensions.cs index f80978b..b2809b5 100644 --- a/source/DefaultUnDo/ICollectionExtension.cs +++ b/source/DefaultUnDo/Extensions/ICollectionExtensions.cs @@ -7,7 +7,7 @@ namespace DefaultUnDo; /// /// Provides a method to wrap an to an UnDo collection linked to an to automatically generate operations. /// -public static class ICollectionExtension +public static class ICollectionExtensions { /// /// Wraps an to an UnDo collection linked to an to automatically generate operations. diff --git a/source/DefaultUnDo/IDictionaryExtension.cs b/source/DefaultUnDo/Extensions/IDictionaryExtensions.cs similarity index 97% rename from source/DefaultUnDo/IDictionaryExtension.cs rename to source/DefaultUnDo/Extensions/IDictionaryExtensions.cs index 4b89d4c..7d69064 100644 --- a/source/DefaultUnDo/IDictionaryExtension.cs +++ b/source/DefaultUnDo/Extensions/IDictionaryExtensions.cs @@ -7,7 +7,7 @@ namespace DefaultUnDo; /// /// Provides a method to wrap an to an UnDo dictionary linked to an to automatically generate operations. /// -public static class IDictionaryExtension +public static class IDictionaryExtensions { /// /// Wraps an to an UnDo dictionary linked to an to automatically generate operations. diff --git a/source/DefaultUnDo/IListExtension.cs b/source/DefaultUnDo/Extensions/IListExtensions.cs similarity index 98% rename from source/DefaultUnDo/IListExtension.cs rename to source/DefaultUnDo/Extensions/IListExtensions.cs index 65e24c3..627d983 100644 --- a/source/DefaultUnDo/IListExtension.cs +++ b/source/DefaultUnDo/Extensions/IListExtensions.cs @@ -8,7 +8,7 @@ namespace DefaultUnDo; /// /// Provides a method to wrap an to an UnDo list linked to an to automatically generate operations. /// -public static class IListExtension +public static class IListExtensions { /// /// Wraps an to an UnDo list linked to an to automatically generate operations. diff --git a/source/DefaultUnDo/ISetExtension.cs b/source/DefaultUnDo/Extensions/ISetExtensions.cs similarity index 97% rename from source/DefaultUnDo/ISetExtension.cs rename to source/DefaultUnDo/Extensions/ISetExtensions.cs index f30e405..d0a8f4f 100644 --- a/source/DefaultUnDo/ISetExtension.cs +++ b/source/DefaultUnDo/Extensions/ISetExtensions.cs @@ -7,7 +7,7 @@ namespace DefaultUnDo; /// /// Provides a method to wrap an to an UnDo set linked to an to automatically generate operations. /// -public static class ISetExtension +public static class ISetExtensions { /// /// Wraps an to an UnDo set linked to an to automatically generate operations. diff --git a/source/DefaultUnDo/IUnDoManagerExtension.cs b/source/DefaultUnDo/Extensions/IUnDoManagerExtensions.cs similarity index 99% rename from source/DefaultUnDo/IUnDoManagerExtension.cs rename to source/DefaultUnDo/Extensions/IUnDoManagerExtensions.cs index 59820c3..3f6bde9 100644 --- a/source/DefaultUnDo/IUnDoManagerExtension.cs +++ b/source/DefaultUnDo/Extensions/IUnDoManagerExtensions.cs @@ -7,7 +7,7 @@ namespace DefaultUnDo; /// /// Provides methods to create command and add them to an . /// -public static class IUnDoManagerExtension +public static class IUnDoManagerExtensions { /// /// Adds an item from a as a operation. diff --git a/source/DefaultUnDo/Internal/Operation.cs b/source/DefaultUnDo/Internal/Operation.cs index 23769ba..1b0fa44 100644 --- a/source/DefaultUnDo/Internal/Operation.cs +++ b/source/DefaultUnDo/Internal/Operation.cs @@ -1,15 +1,6 @@ namespace DefaultUnDo.Internal; -internal readonly struct Operation -{ - public readonly IUnDo Command; - public readonly int DoVersion; - public readonly int UndoVersion; - - public Operation(IUnDo command, int doVersion, int undoVersion) - { - Command = command; - DoVersion = doVersion; - UndoVersion = undoVersion; - } -} +internal readonly record struct Operation( + IUnDo Command, + int DoVersion, + int UndoVersion); \ No newline at end of file diff --git a/source/DefaultUnDo/UnDoCollectionAction.cs b/source/DefaultUnDo/UnDoCollectionAction.cs index 70446d2..2060874 100644 --- a/source/DefaultUnDo/UnDoCollectionAction.cs +++ b/source/DefaultUnDo/UnDoCollectionAction.cs @@ -42,7 +42,7 @@ public enum UnDoCollectionAction ISetUnionWith, /// - /// will be performed. + /// will be performed. /// IListMove, ///