共用方式為


ICompilationService.Compile(RelativeFileInfo, String) 方法

定義

編譯內容並傳回編譯的結果。

public:
 Microsoft::AspNetCore::Mvc::Razor::Compilation::CompilationResult Compile(Microsoft::AspNetCore::Mvc::Razor::Compilation::RelativeFileInfo ^ fileInfo, System::String ^ compilationContent);
public Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult Compile (Microsoft.AspNetCore.Mvc.Razor.Compilation.RelativeFileInfo fileInfo, string compilationContent);
abstract member Compile : Microsoft.AspNetCore.Mvc.Razor.Compilation.RelativeFileInfo * string -> Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult
Public Function Compile (fileInfo As RelativeFileInfo, compilationContent As String) As CompilationResult

參數

fileInfo
RelativeFileInfo

RelativeFileInfo已編譯之 Razor 檔案的 。

compilationContent
String

要編譯的產生的 C# 內容。

傳回

CompilationResult 表示編譯的結果。

適用於