DocData Class
When overridden in a derived class, represents a document in memory.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)
System::MarshalByRefObject
Microsoft.VisualStudio.Modeling.Shell::DocData
Microsoft.VisualStudio.Modeling.Shell::ModelingDocData
Microsoft.VisualStudio.Modeling.Shell::SubordinateDocData
| Name | Description | |
|---|---|---|
![]() | DocData(IServiceProvider^, Guid) | Initializes a new instance of the DocData class. |
| Name | Description | |
|---|---|---|
![]() | Cookie | Gets the cookie that identifies the document in the Running Documents table. |
![]() | DocViews | Gets the collection of document views that are open for the document. |
![]() | Encoding | Gets or sets the encoding that persists the document. |
![]() | FileName | Gets the file name of the document. |
![]() | FormatList | Gets a list of formats. |
![]() | Hierarchy | Gets the project hierarchy to which the document belongs. |
![]() | IsBackupFileObsolete | |
![]() | IsLoaded | Gets the document and verifies whether it is loaded. |
![]() | ItemId | Gets the Item ID that is assigned to the document. |
![]() | ServiceProvider | Gets the service provider from the shell. |
![]() | UndoManager | Gets the UndoManager interface for the document. |
![]() | UndoManagerIsShared | Gets the document and verifies whether more than one document is sharing the same UndoManager interface. |
![]() | VSUndoManager | Gets the UndoManager interface. |
| Name | Description | |
|---|---|---|
![]() | BackupFile(String^) | Make a single file backup of this document. Returns whether the document is expected to re-load without data loss. |
![]() | CanSave(Boolean) | Verifies whether the user can cancel the save operation. |
![]() | Close() | Closes the document. |
![]() | CreateObjRef(Type^) | (Inherited from MarshalByRefObject.) |
![]() | DirectoryChanged(String^) | Not currently implemented. |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the DocData and optionally releases the managed resources. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | FilesChanged(UInt32, array<String^>^, array<UInt32>^) | Notifies clients that one or more documents changed. |
![]() | Finalize() | (Inherited from Object.) |
![]() | FlushUndoManager() | Clears the UndoManager. |
![]() | GetClassID(Guid) | Gets the GUID of the editor factory that created the document. |
![]() | GetCurFile(String^, UInt32) | Gets the file name of the document. |
![]() | GetData(Guid, Object^) | Gets the document data from a buffer. |
![]() | GetFormatList(String^) | Gets the list of supported document formats. |
![]() | GetGuidEditorType(Guid) | Gets the GUID of the editor factory that created the IVsPersistDocData object. |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | GetService(Type^) | Return the requested service. |
![]() | GetType() | (Inherited from Object.) |
![]() | HandleLoadDocDataException(String^, Exception^, Boolean) | Manages any exceptions that were thrown when the document was loading. |
![]() | HandleSaveDocDataException(String^, Exception^) | Manages any exceptions that were thrown when the document was saving. |
![]() | IgnoreFileChanges(Int32) | Determines whether changes to the document should be ignored. |
![]() | InitializeLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | InitNew(UInt32) | Initializes the document. |
![]() | IsDirty(Int32) | Verifies whether the document has changed since the most recent save operation. |
![]() | IsDocDataDirty(Int32) | Verifies whether the document has changed since the most recent save operation. |
![]() | IsDocDataReadOnly(Int32) | Verifies whether the document is read-only. |
![]() | IsDocDataReloadable(Int32) | Verifies whether the document can be reloaded. |
![]() | Load(String^, Boolean) | Loads the document into memory. |
![]() | Load(String^, UInt32, Int32) | Loads the document into memory. |
![]() | LoadDocData(String^) | Loads the document by using its file name. |
![]() | LoadDocData(String^, Boolean) | Loads the document by using its file name. |
![]() | MarkDocumentChangedForBackup() | Mark that the document has changed and thus a new backup should be created |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | (Inherited from MarshalByRefObject.) |
![]() | OnDocumentClosed(EventArgs^) | Alerts listeners that the document was closed. |
![]() | OnDocumentClosing(EventArgs^) | Alerts listeners that the document will be closed. |
![]() | OnDocumentLoaded(EventArgs^) | Alerts listeners that the document is loaded. |
![]() | OnDocumentLoading(EventArgs^) | Alerts listeners that the document will be loaded. |
![]() | OnDocumentReadOnlyChanged(EventArgs^) | Alerts listeners that the read-only state of the document has changed. |
![]() | OnDocumentReloaded(EventArgs^) | Alerts listeners that the document has been reloaded. |
![]() | OnDocumentReloading(EventArgs^) | Alerts listeners that the document will be reloaded. |
![]() | OnDocumentSaved(EventArgs^) | Alerts listeners that the document has been saved. |
![]() | OnDocumentSaving(EventArgs^) | Alerts listeners that the document will be saved. |
![]() | OnFileNameChanged(EventArgs^) | Alerts listeners that the file name of the document has changed. |
![]() | OnHierarchyChanged(EventArgs^) | Alerts listeners that the Item ID that is assigned to the document has changed. |
![]() | OnRegisterDocData(UInt32, IVsHierarchy^, UInt32) | Assigns the document to a cookie and project hierarchy. |
![]() | OpenView(Guid, Object^) | Opens a specific view for the document. |
![]() | QueryEditFile() | Alerts listeners that a document is about to be edited. Listeners can vote against the edit. |
![]() | QueryEditFile(String^, tagVSQueryEditFlags) | Alerts listeners that a document is about to be edited. Listeners can vote against the edit. |
![]() | QuerySaveFile() | Alerts listeners that a file is about to be saved. Listeners can |
![]() | QuerySaveFile(String^, tagVSQuerySaveFlags) | Alerts listeners that a file is about to be saved. |
![]() | ReloadDocData(UInt32) | Reloads the document. |
![]() | ReloadDocDataWorker(UInt32) | Reloads the document. |
![]() | RenameDocData(UInt32, IVsHierarchy^, UInt32, String^) | Renames a document and resets its position in the hierarchy. |
![]() | ResumeFileChangeNotification(String^) | Resumes the distribution of document-change notifications for the document. |
![]() | Save(String^) | Saves the document. |
![]() | Save(String^, Int32, UInt32) | Saves the document. |
![]() | SaveCompleted(String^) | Alerts listeners that the document has been saved. |
![]() | SaveDocData(VSSAVEFLAGS, String^, Int32) | Saves the document to a specific location. |
![]() | SaveDocDataToFile(VSSAVEFLAGS, String^, Int32, IVsUIShell^) | Saves the document to a specific location. |
![]() | SaveSubordinateFile(DocData^, String^) | Save the specified document that is subordinate to this document, for example a diagram file. |
![]() | SetData(Guid, Object^) | Sets the document to a buffer. |
![]() | SetDocDataDirty(Int32) | Sets the document's IsDirty flag. |
![]() | SetDocDataReadOnly(Int32) | Sets the document's read-only flag. |
![]() | SetFileName(String^) | Initializes or changes the file name for the document. |
![]() | SetHierarchyInfo(IVsHierarchy^, UInt32) | Initializes or changes the project hierarchy for the document. |
![]() | SetUntitledDocPath(String^) | Currently not implemented. |
![]() | ShowSaveOptionsDlg(UInt32, IntPtr, IntPtr) | Shows a dialog box from which the user can specify additional options for save formats. |
![]() | SuspendFileChangeNotification(String^) | Suspends the distribution of document-change notifications for the document. |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | DocumentClosed | Occurs after the document is closed. |
![]() | DocumentClosing | Occurs before the document is closed. |
![]() | DocumentLoaded | Occurs after the document has been loaded in the modeling window. |
![]() | DocumentLoading | Occurs before the document is loaded in the modeling window. |
![]() | DocumentReadOnlyChanged | Occurs when the read-only flag for the document changes. |
![]() | DocumentReloaded | Occurs after the document is reloaded. |
![]() | DocumentReloading | Occurs before the document is reloaded. |
![]() | DocumentSaved | Occurs after the document is saved. |
![]() | DocumentSaving | Occurs before the document is saved. |
![]() | FileNameChanged | Occurs when the document's file name changes. |
![]() | HierarchyChanged | Occurs when the document's hierarchy or Item ID changes. |
| Name | Description | |
|---|---|---|
![]() ![]() | IPersistFileFormat::GetClassID(Guid) | Gets the class ID of the editor factory that created the document. |
![]() ![]() | IVsFileBackup::BackupFile(String^) | Make a single file backup of this document. |
![]() ![]() | IVsFileBackup::IsBackupFileObsolete(Int32) | Get whether the backup file is up to date. |
![]() ![]() | IDisposable::Dispose() | Releases all resources used by the current instance of the DocData class. |
This class also listens to change events for external documents and can prompt the user to reload the document.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.






