Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an ITextDocument with textBuffer, which is to be saved to the file.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Function CreateTextDocument ( _
textBuffer As ITextBuffer, _
filePath As String _
) As ITextDocument
ITextDocument CreateTextDocument(
ITextBuffer textBuffer,
string filePath
)
ITextDocument^ CreateTextDocument(
ITextBuffer^ textBuffer,
String^ filePath
)
abstract CreateTextDocument :
textBuffer:ITextBuffer *
filePath:string -> ITextDocument
function CreateTextDocument(
textBuffer : ITextBuffer,
filePath : String
) : ITextDocument
Parameters
- textBuffer
Type: Microsoft.VisualStudio.Text.ITextBuffer
The ITextBuffer to be saved to the file.
- filePath
Type: System.String
The full path to the file.
Return Value
Type: Microsoft.VisualStudio.Text.ITextDocument
An ITextDocument.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | textBuffer or filePath is null. |
Remarks
This call does not save the contents of the buffer to the given path.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.