MvcRazorHost Class¶
Inheritance Hierarchy¶
RazorEngineHost
Microsoft.AspNet.Mvc.Razor.MvcRazorHost
Constructors¶
-
MvcRazorHost
(Microsoft.AspNet.Mvc.Razor.Directives.IChunkTreeCache)¶ Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.MvcRazorHost](Microsoft.AspNet.Mvc.Razor.MvcRazorHost.yml) using the specified <paramref name=”chunkTreeCache” />.
Arguments: - chunkTreeCache (Microsoft.AspNet.Mvc.Razor.Directives.IChunkTreeCache) – An [Microsoft.AspNet.Mvc.Razor.Directives.IChunkTreeCache](Microsoft.AspNet.Mvc.Razor.Directives.IChunkTreeCache.yml) rooted at the application base path.
public MvcRazorHost(IChunkTreeCache chunkTreeCache)
-
MvcRazorHost
(System.String) Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.MvcRazorHost](Microsoft.AspNet.Mvc.Razor.MvcRazorHost.yml) with the specified <paramref name=”root” />.
Arguments: - root (System.String) – The path to the application base.
public MvcRazorHost(string root)
-
Properties¶
-
CreateModelExpressionMethod
()¶ Gets the method name used to create model expressions.
Return type: System.String public virtual string CreateModelExpressionMethod { get; }
-
DefaultInheritedChunks
()¶ Gets the list of chunks that are injected by default by this host.
Return type: System.Collections.Generic.IReadOnlyList{Chunk} public virtual IReadOnlyList<Chunk> DefaultInheritedChunks { get; }
-
DefaultModel
()¶ Gets the model type used by default when no model is specified.
Return type: System.String public virtual string DefaultModel { get; }
-
InjectAttribute
()¶ Gets or sets the name attribute that is used to decorate properties that are injected and need to be activated.
Return type: System.String public virtual string InjectAttribute { get; }
-
MainClassNamePrefix
()¶ Return type: System.String public string MainClassNamePrefix { get; }
-
ModelExpressionType
()¶ Gets the type name used to represent @!:ITagHelper- model expression properties.
Return type: System.String public virtual string ModelExpressionType { get; }
-
Methods¶
-
DecorateCodeGenerator
(CodeGenerator, CodeGeneratorContext)¶ Arguments: - incomingGenerator (CodeGenerator) –
- context (CodeGeneratorContext) –
Return type: CodeGenerator
public override CodeGenerator DecorateCodeGenerator(CodeGenerator incomingGenerator, CodeGeneratorContext context)
-
DecorateCodeParser
(ParserBase)¶ Arguments: - incomingCodeParser (ParserBase) –
Return type: ParserBase
public override ParserBase DecorateCodeParser(ParserBase incomingCodeParser)
-
DecorateRazorParser
(RazorParser, System.String)¶ Arguments: - razorParser (RazorParser) –
- sourceFileName (System.String) –
Return type: RazorParser
public override RazorParser DecorateRazorParser(RazorParser razorParser, string sourceFileName)
-
GenerateCode
(System.String, System.IO.Stream)¶ Arguments: - rootRelativePath (System.String) –
- inputStream (System.IO.Stream) –
Return type: GeneratorResults
public GeneratorResults GenerateCode(string rootRelativePath, Stream inputStream)
-