MetalamaAPI documentationAspect APIMetalama.​Framework.​Code.​Syntax­BuildersStatement­Builder
Open sandboxFocus

StatementBuilder Class

Allows to build a run-time statement that can be injected to run-time code using ToStatement() and InsertStatement(IStatement).

Inheritance
System.Object
StatementBuilder
Namespace: Metalama.Framework.Code.SyntaxBuilders
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class StatementBuilder : SyntaxBuilder

Constructors

Name Description
StatementBuilder()

Methods

Name Description
AppendLine()

Appends a line break.

AppendVerbatim(String)
BeginBlock()

Begins a block (appends a { and increments the indentation level).

Clone()

Returns a clone of the current StatementBuilder.

EndBlock()

Ends a block (appends a } and decrements the indentation level).

Indent()

Increments the indentation level.

ToStatement()

Converts the current StatementBuilder into an IStatement object, which can then be inserted into run-time code using the InsertStatement(IStatement) method.

Unindent()

Decrements the indentation level.