次の方法で共有


OleUndoEngine.IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo Method

Indicates that the undo manager is blocking another undo manager from executing a linked action.

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

Syntax

'宣言
Private Function OnInterveningUnitBlockingLinkedUndo As Integer
    Implements IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo
int IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo()

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo()

Remarks

When this method is called, it means that the undo manager has a non-linked action on top of its undo or redo stack which is blocking another undo manager from executing its linked action.

If possible, you should do the following in response to this call:

1) Activate a window with a view on the corresponding data using the undo manager.

2) Put up a message box with the provided localized error string or put up your own custom UI.

If you can do the above two so that the user knows what happened, return S_OK. Otherwise, you must return E_FAIL, which will cause the undo to fail and break all transaction links to that document.

.NET Framework Security

See Also

Reference

OleUndoEngine Class

Microsoft.VisualStudio.Shell.Design Namespace

UndoEngine.UndoUnit

OleUndoEngine

OleUndoEngine

AddUndoUnit

CreateUndoUnit

DiscardUndoUnit

Dispose

Other Resources

Supplying Undo Support to Designers