Microsoft.AspNetCore.Mvc.Razor.Compilation 命名空間

提供支援 Razor Pages 與 Razor View 編譯所需的類型。

類別

名稱 Description
CompilationFailedException

Exception在存取失敗編譯結果時會被拋棄。

CompiledViewDescriptor

代表彙整後的 Razor 視圖或頁面。

MetadataReferenceFeature

指定 Razor 合輯中使用的清單 MetadataReference 。

MetadataReferenceFeatureProvider

IApplicationFeatureProvider<TFeature>一個 的 MetadataReferenceFeature 會使用 DependencyContext 註冊AssemblyPart實例來建立 MetadataReference。

RazorReferenceManager

管理 Razor 合輯的參考資料。

RazorViewAttribute

此類別會被 RazorCompiledItem 取代,執行時不會使用。

RelativeFileInfo

容器類型連同應用程式基底的相對路徑,代表 IFileInfo 檔案系統中檔案的相對路徑。

RoslynCompilationContext

用於傳遞當前 Razor 頁面編排資訊的上下文物件。

ViewsFeature

一個包含檢視描述符的功能。

ViewsFeatureProvider

IApplicationFeatureProvider<TFeature> ViewsFeature。

結構

名稱 Description
CompilationResult

代表彙編的結果。

介面

名稱 Description
ICompilationService

提供 Razor 頁面編譯的方法。

IRazorCompilationService

規定了編譯 Razor 檔案的服務合約。

IViewCompilationMemoryCacheProvider

提供一個實例 IMemoryCache ,用於儲存編譯後的 Razor 視圖。

IViewCompiler

代表一個檢視編譯器。

IViewCompilerProvider

提供 IViewCompiler。

備註

欲了解更多關於 MVC 視圖的資訊,請參閱 ASP.NET Core MVC 中的視圖。