ICompilationService Interface

Summary

Provides methods for compilation of a Razor page.

Syntax

public interface ICompilationService

GitHub

View on GitHub

interface Microsoft.AspNet.Mvc.Razor.Compilation.ICompilationService

Methods

Compile(Microsoft.AspNet.Mvc.Razor.Compilation.RelativeFileInfo, System.String)

Compiles content and returns the result of compilation.

Arguments:
  • fileInfo (Microsoft.AspNet.Mvc.Razor.Compilation.RelativeFileInfo) – The [Microsoft.AspNet.Mvc.Razor.Compilation.RelativeFileInfo](Microsoft.AspNet.Mvc.Razor.Compilation.RelativeFileInfo.yml) for the Razor file that was compiled.
  • compilationContent (System.String) – The generated C# content to be compiled.
Return type:

Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult

Returns:

A [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) representing the result of compilation.

CompilationResult Compile(RelativeFileInfo fileInfo, string compilationContent)