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

Class StatementFactory

Creates instances of the IStatement interface.

Inheritance
StatementFactory
Namespace: Metalama.Framework.Code.SyntaxBuilders
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class StatementFactory : Object

Methods

Name Description
FromExpression(IExpression)
Parse(String)

Parses a string containing a C# statement and returns an IStatement, which can be inserted into the run-time code using InsertStatement(IStatement). The string must contain a single statement, and must be finished by a semicolon or a closing bracket. An alternative to this method is the StatementBuilder class.