共用方式為


FileContext 類別

定義

描述檔案可能所屬的內容,例如來源檔案的編譯單位、.js 檔案的取用 HTML 頁面等等。

public ref class FileContext : Microsoft::VisualStudio::Workspace::INotifyFileContextChanged
[Windows::Foundation::Metadata::WebHostHidden]
class FileContext : Microsoft::VisualStudio::Workspace::INotifyFileContextChanged
public class FileContext : Microsoft.VisualStudio.Workspace.INotifyFileContextChanged
type FileContext = class
    interface INotifyFileContextChanged
Public Class FileContext
Implements INotifyFileContextChanged
繼承
FileContext
實作

備註

此類型的實例可以跨許多檔案或內容的成員共用。

建構函式

FileContext(Guid, Guid, Object, IReadOnlyCollection<String>, String, INotifyFileContextChanged)

初始化 FileContext 類別的新執行個體。

欄位

EmptyFileContexts

空的檔案內容

屬性

Context

取得語言服務必須完整初始化此內容成員的資訊。

ContextType

取得物件類型的識別碼,以及 中 Context表示的數據。 這可以用來與相容的語言服務提供者進行比對。

DisplayName

取得此內容的名稱 (,如果可能會向用戶顯示的任何) ,以在數個可用內容之間挑選。

InputFiles

取得做為計算此內容的輸入之檔案的工作區相對路徑集。 這不是要進入編譯單位的來源檔案集,而是讀取的一組檔案,以決定如何組合內容。

NotifyFileContextChanged

傳回或設定目前的檔案內容已變更

OnFileContextChanged

當檔案內容變更時

ProviderType

此內容的提供者來源

方法

CreateFileContexts(FileContext[])

傳回檔案內容集合

GetContext<T>()

取得假設預期型別的內容

IsContextTypeOf<T>()

如果自主內容是特定類型

適用於