Dela via


ICompilationService.Compile(RelativeFileInfo, String) Method

Definition

Compiles content and returns the result of compilation.

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

Parameters

fileInfo
RelativeFileInfo

The RelativeFileInfo for the Razor file that was compiled.

compilationContent
String

The generated C# content to be compiled.

Returns

A CompilationResult representing the result of compilation.

Applies to