ITextDocumentFactoryService.CreateTextDocument(ITextBuffer, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an ITextDocument with textBuffer
, which is to be saved to filePath
public:
Microsoft::VisualStudio::Text::ITextDocument ^ CreateTextDocument(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer, System::String ^ filePath);
public Microsoft.VisualStudio.Text.ITextDocument CreateTextDocument (Microsoft.VisualStudio.Text.ITextBuffer textBuffer, string filePath);
abstract member CreateTextDocument : Microsoft.VisualStudio.Text.ITextBuffer * string -> Microsoft.VisualStudio.Text.ITextDocument
Public Function CreateTextDocument (textBuffer As ITextBuffer, filePath As String) As ITextDocument
Parameters
- textBuffer
- ITextBuffer
The ITextBuffer to be saved to filePath
.
- filePath
- String
The full path to the file.
Returns
An ITextDocument.
Exceptions
textBuffer
or filePath
is null.
Remarks
This call does not save the contents of the buffer to the given path.