Megosztás a következőn keresztül:


MvcRazorHost.DecorateRazorParser(RazorParser, String) Method

Definition

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

public:
 override Microsoft::AspNetCore::Razor::Parser::RazorParser ^ DecorateRazorParser(Microsoft::AspNetCore::Razor::Parser::RazorParser ^ razorParser, System::String ^ sourceFileName);
public override Microsoft.AspNetCore.Razor.Parser.RazorParser DecorateRazorParser (Microsoft.AspNetCore.Razor.Parser.RazorParser razorParser, string sourceFileName);
override this.DecorateRazorParser : Microsoft.AspNetCore.Razor.Parser.RazorParser * string -> Microsoft.AspNetCore.Razor.Parser.RazorParser
Public Overrides Function DecorateRazorParser (razorParser As RazorParser, sourceFileName As String) As RazorParser

Parameters

razorParser
RazorParser
sourceFileName
String

The file name of the Razor file being parsed.

Returns

Either the same code parser, after modifications, or a different code parser.

Applies to