Compartilhar via


OleUndoEngine Constructor

Initializes a new instance of OleUndoEngine.

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

Syntax

'Declaration
Public Sub New ( _
    provider As IServiceProvider _
)
public OleUndoEngine(
    IServiceProvider provider
)
public:
OleUndoEngine(
    IServiceProvider^ provider
)
new : 
        provider:IServiceProvider -> OleUndoEngine
public function OleUndoEngine(
    provider : IServiceProvider
)

Parameters

  • provider
    Type: IServiceProvider

    A instance of the IServiceProvider interface to be used to obtain system resources by the instance of OleUndoEngine.

Exceptions

Exception Condition
InvalidOperationException

Thrown if IServiceProvider does not supply necessary services.

Remarks

Required Services

These services are required for OleUndoEngine to function. The object will throw an InvalidOperationException object if any of these services do not exist.

IOleUndoManager

Provides the undo stack.

IDesignerSerializationService

Required by the underlying UndoEngineclass to perform undo stack serialization.

IDesignerHost

Required to implement any designer

IComponentChangeService

Provides component change tracking.

Optional Services

These services are not required, but if they are present OleUndoEngine will make use of them.

IVsLinkCapableUndoManager

This interface is queried from IOleUndoManager and if present, OleUndoEnginewill enable linking of undo units across documents.

IVsLinkedUndoTransactionManager

Managed undo units across linked documents.

IVsWindowFrame

Used if needed in handling linked documents to surface the current document if it is blocking another document from being save.

.NET Framework Security

See Also

Reference

OleUndoEngine Class

Microsoft.VisualStudio.Shell.Design Namespace

UndoUnit

OleUndoEngine

OnInterveningUnitBlockingLinkedUndo

AddUndoUnit

CreateUndoUnit

DiscardUndoUnit

Dispose

Other Resources

Supplying Undo Support to Designers