Share via


MvcRazorHost Class

Definition

public ref class MvcRazorHost : Microsoft::AspNetCore::Razor::RazorEngineHost, Microsoft::AspNetCore::Mvc::Razor::IMvcRazorHost
public class MvcRazorHost : Microsoft.AspNetCore.Razor.RazorEngineHost, Microsoft.AspNetCore.Mvc.Razor.IMvcRazorHost
type MvcRazorHost = class
    inherit RazorEngineHost
    interface IMvcRazorHost
Public Class MvcRazorHost
Inherits RazorEngineHost
Implements IMvcRazorHost
Inheritance
MvcRazorHost
Implements

Constructors

MvcRazorHost(IChunkTreeCache, ITagHelperDescriptorResolver)

Initializes a new instance of MvcRazorHost using the specified chunkTreeCache.

Properties

CodeLanguage

The language of the code within the Razor template.

(Inherited from RazorEngineHost)
CreateModelExpressionMethod

Gets the method name used to create model expressions.

DefaultBaseClass

The base-class of the generated class

(Inherited from RazorEngineHost)
DefaultClassName

The name of the generated class

(Inherited from RazorEngineHost)
DefaultInheritedChunks

Gets the list of chunks that are injected by default by this host.

DefaultModel

Gets the model type used by default when no model is specified.

DefaultNamespace

The namespace which will contain the generated class

(Inherited from RazorEngineHost)
DesignTimeMode

Indicates if the parser and chunk generator should run in design-time mode

(Inherited from RazorEngineHost)
EnableInstrumentation

Boolean indicating if instrumentation code should be injected into the output page

(Inherited from RazorEngineHost)
GeneratedClassContext

Details about the methods and types that should be used to generate code for Razor constructs

(Inherited from RazorEngineHost)
InjectAttribute

Gets or sets the name attribute that is used to decorate properties that are injected and need to be activated.

InstrumentedSourceFilePath

Gets or sets the path to use for this document when generating Instrumentation calls

(Inherited from RazorEngineHost)
IsIndentingWithTabs

Gets or sets whether the design time editor is using tabs or spaces for indentation.

(Inherited from RazorEngineHost)
ModelExpressionProvider

Gets the property name for IModelExpressionProvider.

ModelExpressionType

Gets the type name used to represent ITagHelper model expression properties.

NamespaceImports

A list of namespaces to import in the generated file

(Inherited from RazorEngineHost)
StaticHelpers

Boolean indicating if helper methods should be instance methods or static methods

(Inherited from RazorEngineHost)
TabSize

Tab size used by the hosting editor, when indenting with tabs.

(Inherited from RazorEngineHost)
TagHelperDescriptorResolver

The ITagHelperDescriptorResolver used to resolve TagHelperDescriptors.

ViewDataPropertyName

Gets the property name for ViewDataDictionary.

Methods

CreateMarkupParser()

Constructs the markup parser. Must return a new instance on EVERY call to ensure thread-safety

(Inherited from RazorEngineHost)
DecorateChunkGenerator(RazorChunkGenerator)

Gets an instance of the chunk generator and is provided an opportunity to decorate or replace it

(Inherited from RazorEngineHost)
DecorateCodeGenerator(CodeGenerator, CodeGeneratorContext)

Gets an instance of the code generator and is provided an opportunity to decorate or replace it

DecorateCodeParser(ParserBase)

Gets an instance of the code parser and is provided an opportunity to decorate or replace it

DecorateMarkupParser(ParserBase)

Gets an instance of the markup parser and is provided an opportunity to decorate or replace it

(Inherited from RazorEngineHost)
DecorateRazorParser(RazorParser, String)

Provides an opportunity for derived types to modify the instance of RazorParser used by the RazorTemplateEngine to parse the Razor tree.

GenerateCode(String, Stream)

Parses and generates the contents of a Razor file represented by inputStream.

GetInheritedChunkTreeResults(String)

Locates and parses _ViewImports.cshtml files applying to the given sourceFileName to create ChunkTreeResults.

Applies to