Share via


RazorCodeGenerator Class

Definition

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents a Razor code generator.

public abstract class RazorCodeGenerator : System.Web.Razor.Parser.ParserVisitor
type RazorCodeGenerator = class
    inherit ParserVisitor
Public MustInherit Class RazorCodeGenerator
Inherits ParserVisitor
Inheritance
RazorCodeGenerator
Derived

Constructors

Name Description
RazorCodeGenerator(String, String, String, RazorEngineHost)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the RazorCodeGenerator class.

Properties

Name Description
CancelToken

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the cancellation token.

(Inherited from ParserVisitor)
ClassName

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the class name for this code.

Context

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the context of this code generator.

DesignTimeMode

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets a value indicating whether the code generator is in design-time mode.

GenerateLinePragmas

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets a value indicating whether the generator should generate line pragmas in the Razor code.

Host

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the razor engine host.

RootNamespaceName

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the name of the root namespace.

SourceFileName

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the name of the source file.

Methods

Name Description
Initialize(CodeGeneratorContext)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes the current RazorCodeGenerator instance.

OnComplete()

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Raises the Complete event.

ThrowIfCanceled()

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

(Inherited from ParserVisitor)
VisitBlock(Block)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Visits the specified block.

(Inherited from ParserVisitor)
VisitEndBlock(Block)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Visits the end block.

VisitError(RazorError)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Visits the given razor error.

(Inherited from ParserVisitor)
VisitSpan(Span)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Visits the span.

VisitStartBlock(Block)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Visits the start block.

Extension Methods

Name Description
Visit(ParserVisitor, ParserResults)

Applies to