Condividi tramite


SubordinateDocData Class

Definition

Important

This API is not CLS-compliant.

DocData object that represents a subordinate file in memory (represented as a child project item in the Solution Explorer).

public ref class SubordinateDocData : Microsoft::VisualStudio::Modeling::Shell::DocData
[System.CLSCompliant(false)]
public class SubordinateDocData : Microsoft.VisualStudio.Modeling.Shell.DocData
public class SubordinateDocData : Microsoft.VisualStudio.Modeling.Shell.DocData
[<System.CLSCompliant(false)>]
type SubordinateDocData = class
    inherit DocData
type SubordinateDocData = class
    inherit DocData
Public Class SubordinateDocData
Inherits DocData
Inheritance
SubordinateDocData
Attributes

Remarks

Subordinate files are assumed to have some "parent" DocData object that handles actual serialization. This class exists so that the subordinate file can be registered in the VS Running Documents Table and tracked by the VS shell.

Constructors

SubordinateDocData(IServiceProvider, DocData)

Creates a SubordinateDocData instance.

Properties

Cookie

Gets the cookie used to indentify this document in the RDT (running documents table).

(Inherited from DocData)
DocViews

Retrieves the collection of views currently open on this document.

(Inherited from DocData)
Encoding

Gets or sets the encoding that this doc data is persisted in

(Inherited from DocData)
FileName

Gets the filename corresponding to this document

(Inherited from DocData)
FormatList

List of format specifiers for the SubordinateDocData.

Hierarchy

Gets the hierarchy this document belongs to.

(Inherited from DocData)
IsBackupFileObsolete

Is the backup file dirty with respect to this document?

(Inherited from DocData)
IsLoaded

Indicates whether this DocData has been loaded.

(Inherited from DocData)
ItemId

Gets the itemid which identifies this document within its hierarchy.

(Inherited from DocData)
ParentDocData

Retrieves the parent DocData for this subordinate document.

ServiceProvider (Inherited from DocData)
UndoManager

Returns the undo manager for the DocData.

(Inherited from DocData)
UndoManagerIsShared

If derived classes need share the same undo manager among multiple DocData instances, they should override this property to return true. Derived classes that return true here are also responsible for handling undo manager disposal.

(Inherited from DocData)
VSUndoManager

Provides access to the VS undo manager interface.

(Inherited from DocData)

Methods

BackupFile(String)

Make a single file backup of this document. Returns whether the document is expected to re-load without data loss. If there are any actual save errors then an exception should be raised.

(Inherited from DocData)
CanSave(Boolean)

Provides derived classes a mechanism to cancel a save operation.

(Inherited from DocData)
Close()

Called by the shell when it wants to close the document.

(Inherited from DocData)
DirectoryChanged(String)

Unused.

(Inherited from DocData)
Dispose(Boolean)

Disposes the state of this object.

(Inherited from DocData)
FilesChanged(UInt32, String[], UInt32[])

Notifies clients of changes made to one or more files.

(Inherited from DocData)
FlushUndoManager()

Clears the undo/redo stacks

(Inherited from DocData)
GetClassID(Guid)

Returns the GUID of our editor factory.

(Inherited from DocData)
GetCurFile(String, UInt32)

Returns the current file name.

(Inherited from DocData)
GetData(Guid, Object)

Implementation of IVsUserData.GetData

(Inherited from DocData)
GetFormatList(String)

Returns the list of file formats we support so that the shell can display the Save As dialog.

(Inherited from DocData)
GetGuidEditorType(Guid)

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

(Inherited from DocData)
GetService(Type)

Return the requested service.

(Inherited from DocData)
HandleLoadDocDataException(String, Exception, Boolean)

Called to handle exception thrown during LoadDocData (if any)

(Inherited from DocData)
HandleSaveDocDataException(String, Exception)

Called to handle exception thrown during SaveDocData (if any)

(Inherited from DocData)
IgnoreFileChanges(Int32)

IVsDocDataFileChangeControl interface implementation. Allows clients such as SCC to inform the DocData to ignore file changes (in the case a file is reloaded from SCC, for example).

(Inherited from DocData)
InitNew(UInt32)

Initializes a document data class.

(Inherited from DocData)
IsDirty(Int32)

Repeats the functionality provided by IVsPersistDocData2.IsDocDataDirty.

(Inherited from DocData)
IsDocDataDirty(Int32)

By default, the subordinate document is considered dirty if the parent is dirty.

IsDocDataReadOnly(Int32)

Determines if the document data is read-only.

(Inherited from DocData)
IsDocDataReloadable(Int32)

Determines whether or not the document data can be reloaded.

(Inherited from DocData)
Load(String, Boolean)

Subordinate files are assumed to have some "parent" DocData object that handles actual serialization, so Load operation is a no-op.

Load(String, UInt32, Int32)

Loads a file.

(Inherited from DocData)
LoadDocData(String, Boolean)

Loads the document data from a given file name. Called by IVsPersistDocData2.LoadDocData and IVsPersistDocData2.ReloadDocData

(Inherited from DocData)
LoadDocData(String)

Loads the document data from a given file name.

(Inherited from DocData)
MarkDocumentChangedForBackup()

Mark that the document has changed and thus a new backup should be created

(Inherited from DocData)
OnDocumentClosed(EventArgs)

Called after the document is closed

(Inherited from DocData)
OnDocumentClosing(EventArgs)

Called before the document is closed

(Inherited from DocData)
OnDocumentLoaded(EventArgs)

Called after the document has been initially loaded.

(Inherited from DocData)
OnDocumentLoading(EventArgs)

Called before the document is initially loaded with data.

(Inherited from DocData)
OnDocumentReadOnlyChanged(EventArgs)

Called when the ReadOnly state of the document changes.

(Inherited from DocData)
OnDocumentReloaded(EventArgs)

Called after the document has been reloaded.

(Inherited from DocData)
OnDocumentReloading(EventArgs)

Called before the document is reloaded.

(Inherited from DocData)
OnDocumentSaved(EventArgs)

Called after the document has been saved.

(Inherited from DocData)
OnDocumentSaving(EventArgs)

Called before the document is saved.

(Inherited from DocData)
OnFileNameChanged(EventArgs)

Called when the document's filename changes.

(Inherited from DocData)
OnHierarchyChanged(EventArgs)

Called when the document's hierarchy or itemid changes

(Inherited from DocData)
OnRegisterDocData(UInt32, IVsHierarchy, UInt32)

Called by the RDT (running documents table) when it registers the document data.

(Inherited from DocData)
OpenView(Guid, Object)

Called to open a particular view on this DocData.

(Inherited from DocData)
QueryEditFile()

Helper to perform an SCC QueryEditFiles on the file represented by this DocData.

(Inherited from DocData)
QueryEditFile(String, tagVSQueryEditFlags)

Helper to perform an SCC QueryEditFiles call.

(Inherited from DocData)
QuerySaveFile()

Helper to perform an SCC QuerySaveFiles call on the file represented by this DocData.

(Inherited from DocData)
QuerySaveFile(String, tagVSQuerySaveFlags)

Helper to perform an SCC QuerySaveFiles call.

(Inherited from DocData)
ReloadDocData(UInt32)

Reloads the document data.

(Inherited from DocData)
ReloadDocDataWorker(UInt32)

Overridable implementation for handling ReloadDocData.

(Inherited from DocData)
RenameDocData(UInt32, IVsHierarchy, UInt32, String)

Called by the shell when it wants to rename a document.

(Inherited from DocData)
ResumeFileChangeNotification(String)

Resume file change notifications for the given file.

(Inherited from DocData)
Save(String, Int32, UInt32)

Saves a document.

(Inherited from DocData)
Save(String)

Subordinate files are assumed to have some "parent" DocData object that usually handles actual serialization Save operation is a no-op except in the case of SaveAs.

SaveAs(String)

Save as the doc data to a file

SaveCompleted(String)

Called when the save operation is complete.

(Inherited from DocData)
SaveDocData(VSSAVEFLAGS, String, Int32)

Saves the document data to a given location. May need to display the Save As dialog.

(Inherited from DocData)
SaveDocDataToFile(VSSAVEFLAGS, String, Int32, IVsUIShell)

Save as the doc data to a file

(Inherited from DocData)
SaveSubordinateFile(DocData, String)

Save the given document that is subordinate to this document.

(Inherited from DocData)
SetData(Guid, Object)

Implementation of IVsUserData.SetData Called by IVsCodePageSelection.ShowEncodingDialog to return the selected encoding.

(Inherited from DocData)
SetDocDataDirty(Int32)

Sets the dirty flag for the document data.

(Inherited from DocData)
SetDocDataReadOnly(Int32)

Sets the readOnly flag for the document.

(Inherited from DocData)
SetFileName(String)

Called to initialize/change the filename

(Inherited from DocData)
SetHierarchyInfo(IVsHierarchy, UInt32)

Called to initialize/change the hierarchy.

(Inherited from DocData)
SetUntitledDocPath(String)

Unused.

(Inherited from DocData)
ShowSaveOptionsDlg(UInt32, IntPtr, IntPtr)

Implementation of IVsSaveOptionsDlg.ShowSaveOptionsDlg. Display the AdvancedSaveDialog to gather the encoding from the user.

(Inherited from DocData)
SuspendFileChangeNotification(String)

Suspend file change notifications for the given file. Helpful to avoid spurious file reload messages for subordinate files.

(Inherited from DocData)

Events

DocumentClosed

Fired after the document is closed

(Inherited from DocData)
DocumentClosing

Fired before the document is closed

(Inherited from DocData)
DocumentLoaded

Fires after the document has been initially loaded.

(Inherited from DocData)
DocumentLoading

Fires before the document is intitially loaded with data.

(Inherited from DocData)
DocumentReadOnlyChanged

Fired when the ReadOnly state of the document changes.

(Inherited from DocData)
DocumentReloaded

Fires after the document has been reloaded.

(Inherited from DocData)
DocumentReloading

Fires before the document is reloaded.

(Inherited from DocData)
DocumentSaved

Fires after the document has been saved.

(Inherited from DocData)
DocumentSaving

Fires before the document is saved.

(Inherited from DocData)
FileNameChanged

Fired when the document's filename changes.

(Inherited from DocData)
HierarchyChanged

Fired when the document's hierarhcy or itemid changes

(Inherited from DocData)

Explicit Interface Implementations

IDisposable.Dispose()

Cleans up resources allocated by the doc data. Allows us to pre-empt the GC.

(Inherited from DocData)
IPersistFileFormat.GetClassID(Guid)

Returns the GUID of our editor factory.

(Inherited from DocData)
IVsFileBackup.BackupFile(String)

Make a single file backup of this document.

(Inherited from DocData)
IVsFileBackup.IsBackupFileObsolete(Int32)

Is the backup file dirty with respect to this document?

(Inherited from DocData)

Applies to