FileTextLoader Class

Definition

public ref class FileTextLoader : Microsoft::CodeAnalysis::TextLoader
[System.Diagnostics.DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
public class FileTextLoader : Microsoft.CodeAnalysis.TextLoader
[<System.Diagnostics.DebuggerDisplay("{GetDebuggerDisplay(), nq}")>]
type FileTextLoader = class
    inherit TextLoader
Public Class FileTextLoader
Inherits TextLoader
Inheritance
FileTextLoader
Attributes

Constructors

Name Description
FileTextLoader(String, Encoding)

Creates a content loader for specified file.

Properties

Name Description
DefaultEncoding

Specifies an encoding to be used if the actual encoding of the file can't be determined from the stream content (the stream doesn't start with Byte Order Mark). If null auto-detect heuristics are used to determine the encoding. Note that if the stream starts with Byte Order Mark the value of DefaultEncoding is ignored.

Path

Absolute path of the file.

Methods

Name Description
CreateText(Stream, Workspace)

Creates SourceText from Stream.

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Load a text and a version of the document in the workspace.

LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
Obsolete.

Load a text and a version of the document in the workspace.

Applies to