Condividi tramite


IVsRunningDocumentTable4 Interface

Definition

Provides methods for dealing with documents in the Running Document Table.

public interface class IVsRunningDocumentTable4 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocumentTable3
public interface class IVsRunningDocumentTable4 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocumentTable3
__interface IVsRunningDocumentTable4 : Microsoft::VisualStudio::Shell::Interop::IVsRunningDocumentTable3
public interface IVsRunningDocumentTable4 : Microsoft.VisualStudio.Shell.Interop.IVsRunningDocumentTable3
[System.Runtime.InteropServices.Guid("86A4DA78-D580-4AE4-A1BE-F805BC663E04")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsRunningDocumentTable4 : Microsoft.VisualStudio.Shell.Interop.IVsRunningDocumentTable3
type IVsRunningDocumentTable4 = interface
    interface IVsRunningDocumentTable3
[<System.Runtime.InteropServices.Guid("86A4DA78-D580-4AE4-A1BE-F805BC663E04")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsRunningDocumentTable4 = interface
    interface IVsRunningDocumentTable3
Public Interface IVsRunningDocumentTable4
Implements IVsRunningDocumentTable3
Attributes
Implements

Remarks

Some members of this interface are safe to access from any thread.

Methods

GetDocumentCookie(String)

This is functionally identical to calling IVsRunningDocumentTable.FindAndLockDocument with RDT_NoLock and requesting only the cookie, but it is easier to consume from managed code. In managed code it is impossible to request the flags without also requesting all of the other information, and requesting all of the other information can result in the potentially unnecessary initialization of an RDT_PendingInitialization document.

GetDocumentData(UInt32)

This is functionally identical to calling GetDocumentInfo(UInt32, UInt32, UInt32, UInt32, String, IVsHierarchy, UInt32, IntPtr) and requesting only the document data, but this method easier to consume from managed code.There are two pending states for a document: RDT_PendingHierarchyInitialization: The project that owns the document hasn’t yet been loaded. This can happen only during asynchronous solution load (ASL). As individual projects are loaded, the documents owned by the projects are updated to remove the RDT_PendingHierarchyInitialization flag. By the time the solution is fully loaded, no documents are in this state. RDT_PendingInitialization: The document data hasn’t been loaded, and the view hasn’t been created. A document in this state may or may not also have RDT_PendingHierarchyInitialization, but a document with RDT_PendingHierarchyInitialization always has RDT_PendingInitialization. Documents in this state are referred to as lazy or stub documents. This method causes a lazy document to be loaded immediately, so by the time it returns, the document no longer has the RDT_PendingInitialization flag. You should first call GetDocumentFlags(UInt32) and call GetDocumentData only if the document doesn’t have RDT_PendingInitialization among its flags. You can be notified that the document has been loaded by subscribing to running document table events and looking for the RDTA_DocumentInitialized flag in OnAfterAttributeChange(UInt32, UInt32) or OnAfterAttributeChangeEx(UInt32, UInt32, IVsHierarchy, UInt32, String, IVsHierarchy, UInt32, String).

GetDocumentEditLockCount(UInt32)

This is functionally identical to calling IVsRunningDocumentTable.GetDocumentInfo and requesting only the edit lock count, but it is easier to consume from managed code. In managed code it is impossible to request the flags without also requesting all of the other information, and requesting all of the other information can result in the potentially unnecessary initialization of an RDT_PendingInitialization document.

GetDocumentFlags(UInt32)

This is functionally identical to calling GetDocumentInfo(UInt32, UInt32, UInt32, UInt32, String, IVsHierarchy, UInt32, IntPtr) and requesting only the flags, but it is easier to consume from managed code. In managed code it is impossible to request the flags without also requesting all information, and requesting all of the other information can result in the potentially unnecessary initialization of an RDT_PendingInitialization document.

GetDocumentHierarchyItem(UInt32, IVsHierarchy, UInt32)

This is functionally identical to calling GetDocumentInfo(UInt32, UInt32, UInt32, UInt32, String, IVsHierarchy, UInt32, IntPtr) and requesting only the document data, but this method easier to consume from managed code.There are two pending states for a document: RDT_PendingHierarchyInitialization: The project that owns the document hasn’t yet been loaded. This can happen only during asynchronous solution load (ASL). As individual projects are loaded, the documents owned by the projects are updated to remove the RDT_PendingHierarchyInitialization flag. By the time the solution is fully loaded, no documents are in this state. RDT_PendingInitialization: The document data hasn’t been loaded, and the view hasn’t been created. A document in this state may or may not also have RDT_PendingHierarchyInitialization, but a document with RDT_PendingHierarchyInitialization always has RDT_PendingInitialization. Documents in this state are referred to as lazy or stub documents. This method causes the project that owns a lazy document to be loaded immediately, rather than waiting for it to be loaded normally, so by the time the method returns, the document no longer has RDT_PendingHierarchyInitialization. It doesn’t cause the document itself to be loaded.You should first call GetDocumentFlags(UInt32) and call GetDocumentHierarchyItem only if the document doesn’t have RDT_PendingInitialization among its flags. You can be notified that the document has been loaded by subscribing to running document table events and looking for the RDTA_DocumentInitialized flag in OnAfterAttributeChange(UInt32, UInt32) or OnAfterAttributeChangeEx(UInt32, UInt32, IVsHierarchy, UInt32, String, IVsHierarchy, UInt32, String).

GetDocumentMoniker(UInt32)

This is functionally identical to calling IVsRunningDocumentTable.GetDocumentInfo and requesting only the moniker, but it is easier to consume from managed code. In managed code it is impossible to request the flags without also requesting all of the other information, and requesting all of the other information can result in the potentially unnecessary initialization of an RDT_PendingInitialization document.

GetDocumentProjectGuid(UInt32)

Returns the GUID for the project owning the document

GetDocumentReadLockCount(UInt32)

This is functionally identical to calling IVsRunningDocumentTable.GetDocumentInfo and requesting only the read lock count, but it is easier to consume from managed code. In managed code it is impossible to request the flags without also requesting all of the other information, and requesting all of the other information can result in the potentially unnecessary initialization of an RDT_PendingInitialization document.

GetRelatedSaveTreeItems(UInt32, UInt32, UInt32, VSSAVETREEITEM[])

Retrieves the related save tree items for a document.

IsCookieValid(UInt32)

Determines whether the given cookie exists in the RDT.

IsDocumentDirty(UInt32)

Indicates whether the document has changed since the last save.

IsDocumentReadOnly(UInt32)

Indicates whether the document is a read-only document.

IsMonikerValid(String)

Determines whether the given moniker exists in the RDT

NotifyDocumentChangedEx(UInt32, UInt32)

Notifies the client when changes are made to the document.

UpdateDirtyState(UInt32)

Updates the status of the dirty state.

UpdateReadOnlyState(UInt32)

Updates the document’s read-only state.

Applies to