Freigeben über


OleUndoEngine.UndoUnit.IOleParentUndoUnit.Close Method

Closes the specified parent undo unit.

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

Syntax

'Declaration
Private Function Close ( _
    parentUnit As IOleParentUndoUnit, _
    fCommit As Integer _
) As Integer Implements IOleParentUndoUnit.Close
'Usage
Dim instance As OleUndoEngine..::..UndoUnit
Dim parentUnit As IOleParentUndoUnit
Dim fCommit As Integer
Dim returnValue As Integer

returnValue = CType(instance, IOleParentUndoUnit).Close(parentUnit, _
    fCommit)
int IOleParentUndoUnit.Close(
    IOleParentUndoUnit parentUnit,
    int fCommit
)
private:
virtual int Close(
    IOleParentUndoUnit^ parentUnit, 
    int fCommit
) sealed = IOleParentUndoUnit::Close
private abstract Close : 
        parentUnit:IOleParentUndoUnit * 
        fCommit:int -> int 
private override Close : 
        parentUnit:IOleParentUndoUnit * 
        fCommit:int -> int 
JScript does not support explicit interface implementations.

Parameters

  • fCommit
    Type: System.Int32
    true if the unit should be kept in the collection, false if it should be discarded.

Return Value

Type: System.Int32
S_OK if the parent unit had open child units and it was successfully closed.
S_FALSE if the parent undo unit did not have an open child and it was successfully closed.
E_INVALIDARG if parentUnit does not match the currently open parent undo unit. Do not change any internal state unless the parent unit is blocked.

Implements

IOleParentUndoUnit.Close(IOleParentUndoUnit, Int32)

.NET Framework Security

See Also

Reference

OleUndoEngine.UndoUnit Class

OleUndoEngine.UndoUnit Members

Microsoft.VisualStudio.Shell.Design Namespace