CodeGeneratorContext Class

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

Inheritance Hierarchy

System.Object
  System.Web.Razor.Generator.CodeGeneratorContext

Namespace:  System.Web.Razor.Generator
Assembly:  System.Web.Razor (in System.Web.Razor.dll)

Syntax

'Declaration
Public Class CodeGeneratorContext
'Usage
Dim instance As CodeGeneratorContext
public class CodeGeneratorContext
public ref class CodeGeneratorContext
type CodeGeneratorContext =  class end
public class CodeGeneratorContext

The CodeGeneratorContext type exposes the following members.

Properties

  Name Description
Public property CodeMappings This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the dictionary collection of generated code mapping.
Public property CompileUnit This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the code compile unit that will hold the program graph.
Public property CurrentBufferedStatement This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets the current buffered statement.
Public property GeneratedClass This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the generated class type declaration.
Public property 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.
Public property Namespace This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the generated namespace declaration.
Public property SourceFile This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the source file.
Public property TargetMethod This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Gets or sets the generated member method.
Public property TargetWriterName 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 text writer.

Top

Methods

  Name Description
Public method AddCodeMapping This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds a new generated code mapping to the collection.
Public method AddContextCall This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds a code statement for a context call on the specified method.
Public method AddDesignTimeHelperStatement This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds a code statement that inserts the Razor design time helpers method in the specified code statement.
Public method AddStatement(String) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds the specified code statement to the body of the target method.
Public method AddStatement(String, CodeLinePragma) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds the specified code statement to the body of the target method.
Public method BufferStatementFragment(String) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Appends the specified fragment to the current buffered statement.
Public method BufferStatementFragment(Span) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Appends the content of the span to the current buffered statement.
Public method BufferStatementFragment(String, Span) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Appends the specified fragment to the current buffered statement.
Public method ChangeStatementCollector Assigns a new statement collector and returns a disposable action that restores the old statement collector.
Public methodStatic member Create This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Creates a new instance of the CodeGeneratorContext class.
Public method EnsureExpressionHelperVariable This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Adds the expression helper variable to the generated class if not yet added,
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FlushBufferedStatement This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Flushes the current buffered statement.
Public method GenerateLinePragma(Span) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Generates the line pragma for the specified source.
Public method GenerateLinePragma(Span, Int32) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Generates the line pragma for the source.
Public method GenerateLinePragma(SourceLocation, Int32, Int32) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Generates the line pragma for the source.
Public method GenerateLinePragma(Span, Int32, Int32) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Generates the line pragma for the source.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method MarkEndOfGeneratedCode This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Marks the end of generated code.
Public method MarkStartOfGeneratedCode This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Marks the start of generated code.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Razor.Generator Namespace