BaseCodeGenVisitor
Ecng.ComponentModel
Base class for code generation visitors. Provides common implementations for indentation management and writing code lines/text.
实现: ICodeGenVisitor
构造函数
BaseCodeGenVisitor
protected BaseCodeGenVisitor()
baseCodeGenVisitor = BaseCodeGenVisitor()
Initializes a new instance of the BaseCodeGenVisitor class.
属性
方法
ChangeIndent
public ICodeGenVisitor ChangeIndent(bool increase)
result = baseCodeGenVisitor.ChangeIndent(increase)
Changes the current indentation level.
- increase
- If true, increases the indentation by adding a tab character; if false, decreases the indentation.
返回值: The current instance of ICodeGenVisitor.
Write
protected abstract void Write(string text)
baseCodeGenVisitor.Write(text)
Writes text without a newline.
- text
- The text to write.
WriteLine
protected abstract void WriteLine(string text)
baseCodeGenVisitor.WriteLine(text)
Writes a line of text.
- text
- The text to write.