CodeGeneratorContext CodeGeneratorContext CodeGeneratorContext Class

Definition

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.

public class CodeGeneratorContext
type CodeGeneratorContext = class
Public Class CodeGeneratorContext
Inheritance
CodeGeneratorContextCodeGeneratorContextCodeGeneratorContext

Properties

CodeMappings CodeMappings 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.

CompileUnit CompileUnit 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.

CurrentBufferedStatement CurrentBufferedStatement 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.

GeneratedClass GeneratedClass 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.

Host Host 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.

Namespace Namespace 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.

SourceFile SourceFile 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.

TargetMethod TargetMethod 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.

TargetWriterName TargetWriterName 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.

Methods

AddCodeMapping(SourceLocation, Int32, Int32) AddCodeMapping(SourceLocation, Int32, Int32) AddCodeMapping(SourceLocation, Int32, Int32)

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.

AddContextCall(Span, String, Boolean) AddContextCall(Span, String, Boolean) AddContextCall(Span, String, Boolean)

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.

AddDesignTimeHelperStatement(CodeSnippetStatement) AddDesignTimeHelperStatement(CodeSnippetStatement) AddDesignTimeHelperStatement(CodeSnippetStatement)

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.

AddStatement(String) AddStatement(String) 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.

AddStatement(String, CodeLinePragma) AddStatement(String, CodeLinePragma) 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.

BufferStatementFragment(String) BufferStatementFragment(String) 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.

BufferStatementFragment(Span) BufferStatementFragment(Span) 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.

BufferStatementFragment(String, Span) BufferStatementFragment(String, Span) 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.

ChangeStatementCollector(Action<String,CodeLinePragma>) ChangeStatementCollector(Action<String,CodeLinePragma>) ChangeStatementCollector(Action<String,CodeLinePragma>)

Assigns a new statement collector and returns a disposable action that restores the old statement collector.

Create(RazorEngineHost, String, String, String, Boolean) Create(RazorEngineHost, String, String, String, Boolean) Create(RazorEngineHost, String, String, String, Boolean)

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.

EnsureExpressionHelperVariable() EnsureExpressionHelperVariable() 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,

FlushBufferedStatement() FlushBufferedStatement() 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.

GenerateLinePragma(Span) GenerateLinePragma(Span) 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.

GenerateLinePragma(Span, Int32) GenerateLinePragma(Span, Int32) 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.

GenerateLinePragma(Span, Int32, Int32) GenerateLinePragma(Span, Int32, Int32) 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.

GenerateLinePragma(SourceLocation, Int32, Int32) GenerateLinePragma(SourceLocation, Int32, Int32) 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.

MarkEndOfGeneratedCode() MarkEndOfGeneratedCode() 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.

MarkStartOfGeneratedCode() MarkStartOfGeneratedCode() 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.

Applies to