Class ExpressionBuilder<E>
Represents compound expression builder.
Namespace: DotNext.Metaprogramming
Assembly: DotNext.Metaprogramming.dll
Syntax
public abstract class ExpressionBuilder<E> : object, IExpressionBuilder<E> where E : Expression
Type Parameters
| Name | Description |
|---|---|
| E | Type of expression to be constructed. |
Remarks
Any derived expression builder is not thread-safe and event cannot be shared between threads.
Methods
| Improve this Doc View SourceEnd()
Finalizes construction of the expression and adds constructed expression as statement to the entire lexical scope.
Declaration
public void End()
OfType(Type)
Changes type of the expression.
Declaration
public ExpressionBuilder<E> OfType(Type expressionType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | expressionType | The expression type. |
Returns
| Type | Description |
|---|---|
| ExpressionBuilder<E> | This builder. |
Remarks
By default, type of expression is
OfType<T>()
Changes type of the expression.
Declaration
public ExpressionBuilder<E> OfType<T>()
Returns
| Type | Description |
|---|---|
| ExpressionBuilder<E> | This builder. |
Type Parameters
| Name | Description |
|---|---|
| T | The expression type. |