다음을 통해 공유


IVsRunningDocTableEvents2 Interface

Implements methods that fire in response to changes to documents in the Running Document Table (RDT).

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

Syntax

'Declaration
<GuidAttribute("15C7826F-443C-406D-98F8-55F6260669EC")> _
<InterfaceTypeAttribute()> _
Public Interface IVsRunningDocTableEvents2 _
    Inherits IVsRunningDocTableEvents
[GuidAttribute("15C7826F-443C-406D-98F8-55F6260669EC")]
[InterfaceTypeAttribute()]
public interface IVsRunningDocTableEvents2 : IVsRunningDocTableEvents
[GuidAttribute(L"15C7826F-443C-406D-98F8-55F6260669EC")]
[InterfaceTypeAttribute()]
public interface class IVsRunningDocTableEvents2 : IVsRunningDocTableEvents
[<GuidAttribute("15C7826F-443C-406D-98F8-55F6260669EC")>]
[<InterfaceTypeAttribute()>]
type IVsRunningDocTableEvents2 =  
    interface 
        interface IVsRunningDocTableEvents 
    end
public interface IVsRunningDocTableEvents2 extends IVsRunningDocTableEvents

The IVsRunningDocTableEvents2 type exposes the following members.

Methods

  Name Description
Public method OnAfterAttributeChange Called after a change in a document attribute of a document in the Running Document Table (RDT).
Public method OnAfterAttributeChangeEx Called after a document attribute changes. This is an advanced version of the OnAfterAttributeChange method.
Public method OnAfterDocumentWindowHide Called after a document window is hidden.
Public method OnAfterFirstDocumentLock Called after applying the first lock of the specified type to the specified document in the Running Document Table (RDT).
Public method OnAfterSave Called after a document in the Running Document Table (RDT) is saved.
Public method OnBeforeDocumentWindowShow Called before displaying a document window.
Public method OnBeforeLastDocumentUnlock Called before releasing the last lock of the specified type on the specified document in the Running Document Table (RDT).

Top

Remarks

The IVsRunningDocTableEvents2 interface is specified in a call to the AdviseRunningDocTableEvents method in the IVsRunningDocumentTable interface.

The interface's methods use a cookie to represent the client requesting the notification. You use the cookie in the call to the UnadviseRunningDocTableEvents method when the package no longer wants to listen to RDT events.

You may want to implement additional interfaces for richer event notification:

  • To receive notice before a document is saved, implement the IVsRunningDocTableEvents3 interface.

  • To receive notice before the first lock on a document is applied (giving you a chance to load the document), implement the IVsRunningDocTableEvents4 interface.

Notes to Implementers

Implement this interface in your packages to receive events about the state of documents in the RDT. Note that this interface derives from the IVsRunningDocTableEvents interface and must implement all methods on that interface as well.

The cookie parameter passed to all of the methods in this interface represents the document affected by a particular event. This cookie is the same value returned from the FindAndLockDocument or RegisterAndLockDocument methods in the IVsRunningDocumentTable interface.

Notes to Callers

The environment calls this interface when specific events have occurred. This interface provides access to more information than IVsRunningDocTableEvents about when a document is renamed.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace