Click or drag to resize

FileTextLoader Constructor



Creates a content loader for specified file.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis.Workspaces.Desktop (in Microsoft.CodeAnalysis.Workspaces.Desktop.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public FileTextLoader(
	string path,
	Encoding defaultEncoding
)

Parameters

path
Type: SystemString
An absolute file path.
defaultEncoding
Type: System.TextEncoding
Specifies an encoding to be used if the actual encoding can't be determined from the stream content (the stream doesn't start with Byte Order Mark). If not specified auto-detect heuristics are used to determine the encoding. If these heuristics fail the decoding is assumed to be Default. Note that if the stream starts with Byte Order Mark the value of defaultEncoding is ignored.
Exceptions
ExceptionCondition
ArgumentNullExceptionpath is null.
ArgumentExceptionpath is not an absolute path.
See Also