Compartir a través de


OleUndoEngine.CreateUndoUnit Method

This member overrides UndoEngine.CreateUndoUnit(String, Boolean), and more complete documentation might be available in that topic.

Creates a new undo unit.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Protected Overrides Function CreateUndoUnit ( _
    name As String, _
    primary As Boolean _
) As UndoUnit
protected override UndoUnit CreateUndoUnit(
    string name,
    bool primary
)
protected:
virtual UndoUnit^ CreateUndoUnit(
    String^ name, 
    bool primary
) override
abstract CreateUndoUnit : 
        name:string * 
        primary:bool -> UndoUnit  
override CreateUndoUnit : 
        name:string * 
        primary:bool -> UndoUnit
protected override function CreateUndoUnit(
    name : String, 
    primary : boolean
) : UndoUnit

Parameters

  • name
    Type: String

    The name of the undo unit.

  • primary
    Type: Boolean

    true if the undo unit is primary, otherwise false.

Return Value

Type: UndoUnit
The created UndoUnit.

Remarks

This method also sets the returned undo unit as the latest "clean" one if the DocData object has not been modified in it. If this undo unit gets undone, these flags will be reset.

.NET Framework Security

See Also

Reference

OleUndoEngine Class

Microsoft.VisualStudio.Shell.Design Namespace

UndoUnit

OleUndoEngine

OnInterveningUnitBlockingLinkedUndo

IVsLinkedUndoClient

OleUndoEngine

AddUndoUnit

DiscardUndoUnit

Dispose

Other Resources

Supplying Undo Support to Designers