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)

ITextDocument CreateTextDocument(
	ITextBuffer textBuffer,
	string filePath
)

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.

ExceptionCondition
ArgumentNullException

textBuffer or filePath is null.

This call does not save the contents of the buffer to the given path.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft