MvcRazorParser Class

Summary

A subtype of @!:RazorParser- that [Microsoft.AspNet.Mvc.Razor.MvcRazorHost](Microsoft.AspNet.Mvc.Razor.MvcRazorHost.yml) uses to support inheritance of tag helpers from <c>_ViewImports</c> files.

Syntax

public class MvcRazorParser : RazorParser

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Razor.MvcRazorParser

Constructors

MvcRazorParser(RazorParser, System.Collections.Generic.IReadOnlyList<ChunkTree>, System.Collections.Generic.IReadOnlyList<Chunk>, System.String)

Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.MvcRazorParser](Microsoft.AspNet.Mvc.Razor.MvcRazorParser.yml).

Arguments:
  • parser (RazorParser) – The @!:RazorParser- to copy properties from.
  • inheritedChunkTrees (System.Collections.Generic.IReadOnlyList{ChunkTree}) – The [System.Collections.Generic.IReadOnlyList`1]()s that are inherited from parsed pages from _ViewImports files.
  • defaultInheritedChunks (System.Collections.Generic.IReadOnlyList{Chunk}) – The [System.Collections.Generic.IReadOnlyList`1]() inherited by default by all Razor pages in the application.
  • modelExpressionTypeName (System.String) –
public MvcRazorParser(RazorParser parser, IReadOnlyList<ChunkTree> inheritedChunkTrees, IReadOnlyList<Chunk> defaultInheritedChunks, string modelExpressionTypeName)

Methods

GetTagHelperDescriptors(Block, ErrorSink)
Arguments:
  • documentRoot (Block) –
  • errorSink (ErrorSink) –
Return type:

System.Collections.Generic.IEnumerable{TagHelperDescriptor}

protected override IEnumerable<TagHelperDescriptor> GetTagHelperDescriptors(Block documentRoot, ErrorSink errorSink)