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 编译结果的 。

适用于