Delen via


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

FileTextLoader(String, Encoding)

Creates a content loader for specified file.

Properties

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

CreateText(Stream, Workspace)

Creates SourceText from Stream.

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

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

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Load a text and a version of the document.

(Inherited from TextLoader)
LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
Obsolete.

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

Applies to