IVsPersistDocData Interface

 

Enables persistence functionality for document data managed by the text buffer.

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

[InterfaceTypeAttribute(1)]
[GuidAttribute("D5D49C61-1C0B-4EA1-9ADB-A79FB1DBC7B5")]
public interface IVsPersistDocData

NameDescription
System_CAPS_pubmethodClose()

Closes the IVsPersistDocData object.

System_CAPS_pubmethodGetGuidEditorType(Guid)

Returns the unique identifier of the editor factory that created the IVsPersistDocData object.

System_CAPS_pubmethodIsDocDataDirty(Int32)

Determines whether the document data has changed since the last save.

System_CAPS_pubmethodIsDocDataReloadable(Int32)

Determines whether the document data can be reloaded.

System_CAPS_pubmethodLoadDocData(String)

Loads the document data from a given MkDocument.

System_CAPS_pubmethodOnRegisterDocData(UInt32, IVsHierarchy, UInt32)

Called by the Running Document Table (RDT) when it registers the document data in the RDT.

System_CAPS_pubmethodReloadDocData(UInt32)

Reloads the document data and in the process determines whether to ignore a subsequent file change.

System_CAPS_pubmethodRenameDocData(UInt32, IVsHierarchy, UInt32, String)

Renames the document data.

System_CAPS_pubmethodSaveDocData(VSSAVEFLAGS, String, Int32)

Saves the document data.

System_CAPS_pubmethodSetUntitledDocPath(String)

Sets the initial name (or path) for unsaved, newly created document data.

The environment's implementation of the DTE automation Document Object calls the following methods of IVsPersistDocData2:

IsDocDataReadOnly in get_ReadOnly property.

IsDocDataDirty in get_Saved property.

SetDocDataDirty in put_Saved property.

SetDocDataReadOnly in put_ReadOnly property.

GetGuidEditorType in get_Kind.

If your document persists to disk, the environment will also call ReloadDocData. See illustrations of the implementation and/or calling of this interface in the samples and . 385fd2a3-d9f1-4808-87c2-a3f05a91fc36e030e71d-46ec-4875-9240-b8b5a1f06337

Implementation

Implement IVsPersistDocData in collaboration with the text buffer when needing to persist document data.

Return to top
Show: