ITextDocument Interface

 

Represents a document in the file system that persists an ITextBuffer.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public interface class ITextDocument : IDisposable

NameDescription
System_CAPS_pubpropertyEncoding

Gets or sets the encoding of the document when saved to disk.

System_CAPS_pubpropertyFilePath

The name and path of the file.

System_CAPS_pubpropertyIsDirty

Determines whether the ITextBuffer is dirty.

System_CAPS_pubpropertyIsReloading

Determines whether the Reload method is executing.

System_CAPS_pubpropertyLastContentModifiedTime

Gets the last DateTime a change was made to the contents of the ITextBuffer.

System_CAPS_pubpropertyLastSavedTime

Gets the last DateTime the file was saved. This time exactly matches the last file written time on the file system.

System_CAPS_pubpropertyTextBuffer

Gets the ITextBuffer containing the document. This value is always non-null.

NameDescription
System_CAPS_pubmethodDispose()

(Inherited from IDisposable.)

System_CAPS_pubmethodReload()

Reloads the contents of FilePath into a TextBuffer.

System_CAPS_pubmethodReload(EditOptions)

Reloads the contents of FilePath into TextBuffer, using the given EditOptions.

System_CAPS_pubmethodRename(String^)

Rename the document to the given new file path.

System_CAPS_pubmethodSave()

Saves the contents of the TextBuffer to the FilePath.

System_CAPS_pubmethodSaveAs(String^, Boolean)

Saves the contents of the TextBuffer to the specified file path.

System_CAPS_pubmethodSaveAs(String^, Boolean, Boolean)

Saves the contents of the TextBuffer to the specified file path.

System_CAPS_pubmethodSaveAs(String^, Boolean, Boolean, IContentType^)

Saves the contents of the TextBuffer to the specified file path.

System_CAPS_pubmethodSaveAs(String^, Boolean, IContentType^)

Saves the contents of the TextBuffer to the specified file path.

System_CAPS_pubmethodSaveCopy(String^, Boolean)

Saves the contents of the TextBuffer to the given filePath.

System_CAPS_pubmethodSaveCopy(String^, Boolean, Boolean)

Saves the contents of the TextBuffer to the specified file path.

System_CAPS_pubmethodSetEncoderFallback(EncoderFallback^)

Change the encoder fallback of Encoding.

System_CAPS_pubmethodUpdateDirtyState(Boolean, DateTime)

Updates the IsDirty and LastContentModifiedTime properties.

NameDescription
System_CAPS_pubeventDirtyStateChanged

Occurs when the value of IsDirty changes.

System_CAPS_pubeventEncodingChanged

Occurs when the Encoding property changes.

System_CAPS_pubeventFileActionOccurred

Occurs when the document has been loaded from or saved to disk.

Return to top
Show: