Class ICodeGenVisitorExtensions
- Namespace
- Ecng.ComponentModel
- Assembly
- Ecng.ComponentModel.dll
Provides extension methods for ICodeGenVisitor for code generation tasks.
public static class ICodeGenVisitorExtensions
- Inheritance
-
ICodeGenVisitorExtensions
- Inherited Members
Methods
AddLine(ICodeGenVisitor)
Adds an empty line to the code generation output.
public static ICodeGenVisitor AddLine(this ICodeGenVisitor visitor)
Parameters
visitor
ICodeGenVisitorThe code generation visitor.
Returns
- ICodeGenVisitor
The code generation visitor with the added empty line.
Exceptions
- ArgumentNullException
Thrown if
visitor
is null.
AddWithIndent(ICodeGenVisitor)
Adds an empty text line with the current indentation.
public static ICodeGenVisitor AddWithIndent(this ICodeGenVisitor visitor)
Parameters
visitor
ICodeGenVisitorThe code generation visitor.
Returns
- ICodeGenVisitor
The code generation visitor with the added indented line.
Exceptions
- ArgumentNullException
Thrown if
visitor
is null.
ChangeIndent(ICodeGenVisitor)
Changes the indentation level of the code generation visitor. Returns an IDisposable token that resets the indentation when disposed.
public static IDisposable ChangeIndent(this ICodeGenVisitor visitor)
Parameters
visitor
ICodeGenVisitorThe code generation visitor.
Returns
- IDisposable
An IDisposable token for managing the indentation scope.