Udostępnij za pośrednictwem


IVsRunningDocumentTable4.GetDocumentData(UInt32) Method

Definition

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).

public:
 System::Object ^ GetDocumentData(System::UInt32 cookie);
public:
 Platform::Object ^ GetDocumentData(unsigned int cookie);
winrt::Windows::Foundation::IInspectable GetDocumentData(unsigned int cookie);
public object GetDocumentData (uint cookie);
abstract member GetDocumentData : uint32 -> obj
Public Function GetDocumentData (cookie As UInteger) As Object

Parameters

cookie
UInt32

The document cookie.

Returns

The document data.

Applies to