⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genericundoredo.xml

📁 从设计模式角度介绍了updo redo的实现方法
💻 XML
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>GenericUndoRedo</name>
    </assembly>
    <members>
        <member name="T:GenericUndoRedo.IMemento`1">
            <summary>
            The most generic interface of a memento class. A memento is a state that can be saved and restored.
            See details on <b>Memento Design Pattern</b> concept 
            <a href="http://www.google.com/search?q=memento+design+pattern+&amp;btnG=Search">here</a>.
            </summary>
            <remarks>
            <b>Design Considerations:</b>
            The common memento struture a state property and sometimes an action property. 
            In this design those properties are not explicitly , though essentially the 
            In this design, if a memento stores a state and doesn't has the ability to Restore the target to the state, 
            we have to introduce another class or a class per type of memento. 
            With the memento itslef supporting Retore of the states, the state and action are not necessary to be exposed as public properties. 
            And only one class for each type of memento is required, which is simpler to read and easier to maintain.
            <b>NOTE</b> that every class that implements this interface should be serializable, 
            by either annotate it with "[Serializabl]" or manuallying implementing the serialization methods. 
            This requirement should be full filled in order to support the serialization of <see cref="T:GenericUndoRedo.UndoRedoHistory`1"/>.
            </remarks>
        </member>
        <member name="M:GenericUndoRedo.IMemento`1.Restore(`0)">
            <summary>
            Restores target to the state memorized by this memento. Here shows an exapmle of usage.
            <code>
            public void TestMemento(IMemento&lt;Object&gt; memento, Object target) 
            {
                Object oldObj = target.Clone();
                IMemento&lt;Object&gt; previousState = memento.Restore(target);
                Object newObj = previousState.Restore(target);
                Debug.Assert(oldObj.Equals(newObj));
            }
            </code>
            </summary>
            <returns>A memento of the state before restoring, which is refered to as a <i>Inverse Memento</i> of this memento.</returns>
            <remarks>
            Being able to restore its own state, undo can be implemented using an undo stack. But that's not enough for implementing redo. 
            The returned inverse memento is the key to support redo.
            </remarks>
        </member>
        <member name="T:GenericUndoRedo.CompoundMemento`1">
            <summary>
            A class used to group multiple mementos together, which can be pushed on to the undo stack as a single memento. 
            With this class, multiple consecutive actions can be recognized as a single action, which are undo as an entity. 
            It also implements the <see cref="T:GenericUndoRedo.IMemento`1"/> interface, which means one <see cref="T:GenericUndoRedo.CompoundMemento`1"/> can be a 
            member of another <see cref="T:GenericUndoRedo.CompoundMemento`1"/>. Therefore it is possible to create hierachical mementos. 
            </summary>
            <seealso cref="T:GenericUndoRedo.IMemento`1"/>
        </member>
        <member name="M:GenericUndoRedo.CompoundMemento`1.Add(GenericUndoRedo.IMemento{`0})">
            <summary>
            Adds memento to this complex memento. Note that the order of adding mementos is critical.
            </summary>
            <param name="m"></param>
        </member>
        <member name="M:GenericUndoRedo.CompoundMemento`1.Restore(`0)">
            <summary>
            Implicity implememntation of <see cref="M:GenericUndoRedo.IMemento`1.Restore(`0)"/>, which returns <see cref="T:GenericUndoRedo.CompoundMemento`1"/>
            </summary>
            <param name="target"></param>
            <returns></returns>
        </member>
        <member name="M:GenericUndoRedo.CompoundMemento`1.GenericUndoRedo#IMemento{T}#Restore(`0)">
            <summary>
            Explicity implememntation of <see cref="M:GenericUndoRedo.IMemento`1.Restore(`0)"/>
            </summary>
            <param name="target"></param>
            <returns></returns>
        </member>
        <member name="P:GenericUndoRedo.CompoundMemento`1.Size">
            <summary>
            Gets number of sub-memento contained in this complex memento.
            </summary>
        </member>
        <member name="T:GenericUndoRedo.RoundStack`1">
            <summary>
            Stack with capacity, bottom items beyond the capacity are discarded.
            </summary>
            <typeparam name="T"></typeparam>
        </member>
        <member name="M:GenericUndoRedo.RoundStack`1.#ctor(System.Int32)">
            <summary>
            Creates <see cref="T:GenericUndoRedo.RoundStack`1"/> with given capacity
            </summary>
            <param name="capacity"></param>
        </member>
        <member name="M:GenericUndoRedo.RoundStack`1.Pop">
            <summary>
            Removes and returns the object at the top of the <see cref="T:GenericUndoRedo.RoundStack`1"/>.
            </summary>
            <returns></returns>
        </member>
        <member name="M:GenericUndoRedo.RoundStack`1.Push(`0)">
            <summary>
            Inserts an object at the top of the <see cref="T:GenericUndoRedo.RoundStack`1"/>.
            </summary>
            <param name="item"></param>
        </member>
        <member name="M:GenericUndoRedo.RoundStack`1.Peek">
            <summary>
            Returns the object at the top of the <see cref="T:GenericUndoRedo.RoundStack`1"/> without removing it.
            </summary>
        </member>
        <member name="M:GenericUndoRedo.RoundStack`1.Clear">
            <summary>
            Removes all the objects from the <see cref="T:GenericUndoRedo.RoundStack`1"/>.
            </summary>
        </member>
        <member name="P:GenericUndoRedo.RoundStack`1.IsFull">
            <summary>
            Gets if the <see cref="T:GenericUndoRedo.RoundStack`1"/> is full.
            </summary>
        </member>
        <member name="P:GenericUndoRedo.RoundStack`1.Count">
            <summary>
            Gets the number of elements contained in the <see cref="T:GenericUndoRedo.RoundStack`1"/>.
            </summary>
        </member>
        <member name="P:GenericUndoRedo.RoundStack`1.Capacity">
            <summary>
            Gets the capacity of the <see cref="T:GenericUndoRedo.RoundStack`1"/>.
            </summary>
        </member>
        <member name="T:GenericUndoRedo.UndoRedoHistory`1">
            <summary>
            This class represents an undo and redo history.
            </summary>
            <typeparam name="T"></typeparam>
            <seealso cref="T:GenericUndoRedo.IMemento`1"/>
        </member>
        <member name="F:GenericUndoRedo.UndoRedoHistory`1.subject">
            <summary>
            The subject that this undo redo history is about.
            </summary>
        </member>
        <member name="F:GenericUndoRedo.UndoRedoHistory`1.undoStack">
            <summary>
            Undo stack with capacity
            </summary>
        </member>
        <member name="F:GenericUndoRedo.UndoRedoHistory`1.redoStack">
            <summary>
            Redo stack with capacity
            </summary>
        </member>
        <member name="M:GenericUndoRedo.UndoRedoHistory`1.#ctor(`0)">
            <summary>
            Creates <see cref="T:GenericUndoRedo.UndoRedoHistory`1"/> with default capacity.
            </summary>
            <param name="subject"></param>
        </member>
        <member name="M:GenericUndoRedo.UndoRedoHistory`1.#ctor(`0,System.Int32)">
            <summary>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -