语言

FileTextLoader 类

定义

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
继承
FileTextLoader
属性

构造函数

名称 说明
FileTextLoader(String, Encoding)

为指定文件创建内容加载程序。

属性

名称 说明
DefaultEncoding

指定无法从流内容确定文件的实际编码时使用的编码, (流不以字节顺序标记) 开头。 是否 null 使用自动检测启发法来确定编码。 请注意,如果流以字节顺序标记开头,则会忽略 的值 DefaultEncoding 。

Path

文件的绝对路径。

方法

名称 说明
CreateText(Stream, Workspace)

SourceText从 Stream创建 。

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

在工作区中加载文本和文档版本。

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

加载文本和文档版本。

(继承自 TextLoader)
LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
已过时.

在工作区中加载文本和文档版本。

适用于