ITextDocumentFactoryService.CreateAndLoadTextDocument Method (String, IContentType)

Creates an ITextDocument that opens and loads the contents of the file into a new ITextBuffer.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

ITextDocument CreateAndLoadTextDocument(
	string filePath,
	IContentType contentType
)

Parameters

filePath
Type: System.String

The full path to the file to be loaded.

contentType
Type: Microsoft.VisualStudio.Utilities.IContentType

The IContentType for the ITextBuffer.

ExceptionCondition
ArgumentNullException

filePath or contentType is null.

This method is equivalent to CreateAndLoadTextDocument(filePath, contentType, true).

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