Udostępnij za pośrednictwem


ITextDocumentFactoryService.CreateTextDocument(ITextBuffer, String) Method

Definition

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.

Applies to