ITextDocumentFactoryService::CreateAndLoadTextDocument Method (String^, IContentType^)
Visual Studio 2015
Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- filePath
-
Type:
System::String^
The full path to the file to be loaded.
- contentType
-
Type:
Microsoft.VisualStudio.Utilities::IContentType^
The IContentType for the ITextBuffer.
| Exception | Condition |
|---|---|
| ArgumentNullException | filePath or contentType is null. |
This method is equivalent to CreateAndLoadTextDocument(filePath, contentType, true).
Show: