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 自動偵測啟發學習法來判斷編碼方式。 請注意,如果資料流程以 Byte Order Mark 開頭,則會忽略 的值 DefaultEncoding

Path

檔案的絕對路徑。

方法

CreateText(Stream, Workspace)

SourceTextStream 建立 。

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

在工作區中載入文字和檔的版本。

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

載入文字和檔的版本。

(繼承來源 TextLoader)
LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
已淘汰.

在工作區中載入文字和檔的版本。

適用於