Table of Contents

Interface ICodeGenVisitor

Namespace
Ecng.ComponentModel
Assembly
Ecng.ComponentModel.dll

Code generation visitor.

public interface ICodeGenVisitor
Extension Methods

Properties

CurrIndent

Gets the current indentation level in characters.

int CurrIndent { get; }

Property Value

int

Methods

Add(string)

Adds the specified text without a newline.

ICodeGenVisitor Add(string text)

Parameters

text string

The text to add.

Returns

ICodeGenVisitor

The current instance of ICodeGenVisitor.

AddLine(string)

Adds a line of code with the current indentation.

ICodeGenVisitor AddLine(string line)

Parameters

line string

The code line to add.

Returns

ICodeGenVisitor

The current instance of ICodeGenVisitor.

AddWithIndent(string)

Adds the specified text with the current indentation and without a newline.

ICodeGenVisitor AddWithIndent(string text)

Parameters

text string

The text to add.

Returns

ICodeGenVisitor

The current instance of ICodeGenVisitor.

ChangeIndent(bool)

Changes the current indentation level.

ICodeGenVisitor ChangeIndent(bool increase)

Parameters

increase bool

If set to true, increases the indentation; otherwise, decreases it.

Returns

ICodeGenVisitor

The current instance of ICodeGenVisitor.