ICodeGenVisitorExtensions

Ecng.ComponentModel

Provides extension methods for ICodeGenVisitor for code generation tasks.

メソッド

AddLine
public static ICodeGenVisitor AddLine(ICodeGenVisitor visitor)
result = ICodeGenVisitorExtensions.AddLine(visitor)

Adds an empty line to the code generation output.

visitor
The code generation visitor.

戻り値: The code generation visitor with the added empty line.

AddWithIndent
public static ICodeGenVisitor AddWithIndent(ICodeGenVisitor visitor)
result = ICodeGenVisitorExtensions.AddWithIndent(visitor)

Adds an empty text line with the current indentation.

visitor
The code generation visitor.

戻り値: The code generation visitor with the added indented line.

ChangeIndent
public static IDisposable ChangeIndent(ICodeGenVisitor visitor)
result = ICodeGenVisitorExtensions.ChangeIndent(visitor)

Changes the indentation level of the code generation visitor. Returns an IDisposable token that resets the indentation when disposed.

visitor
The code generation visitor.

戻り値: An IDisposable token for managing the indentation scope.