Поделиться через


ITextDocumentFactoryService.CreateTextDocument Method

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

'Декларация
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

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

See Also

Reference

ITextDocumentFactoryService Interface

Microsoft.VisualStudio.Text Namespace