ITextDocumentFactoryService Interface
Visual Studio 2015
Represents a service that creates, loads, and disposes text documents.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
| Name | Description | |
|---|---|---|
![]() | CreateAndLoadTextDocument(String, IContentType) | Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer. |
![]() | CreateAndLoadTextDocument(String, IContentType, Boolean, Boolean) | Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer. |
![]() | CreateAndLoadTextDocument(String, IContentType, Encoding, Boolean) | Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer. |
![]() | CreateTextDocument(ITextBuffer, String) | Creates an ITextDocument with textBuffer, which is to be saved to the file. |
![]() | TryGetTextDocument(ITextBuffer, ITextDocument) | Retrieve an ITextDocument for the given buffer, if one exists. |
| Name | Description | |
|---|---|---|
![]() | TextDocumentCreated | Occurs when an ITextDocument is created. |
![]() | TextDocumentDisposed | Occurs when an ITextDocument is disposed. |
This is a MEF component part, and should be imported as follows:
[Import] ITextDocumentFactoryService factory = null;
Show:

