Metalama 1.0 / / Metalama Documentation / Aspect API Documentation / Metalama.​Framework.​Code.​Syntax­Builders / Statement­Builder

Class StatementBuilder

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

Inheritance
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.

Extension Methods

PresentingExtensions.AsHyperlink(Object)