Class ExpressionBuilder<TExpression>
Represents compound expression builder.
Inheritance
ExpressionBuilder<TExpression>
Inherited Members
Namespace: DotNext.Metaprogramming
Assembly: DotNext.Metaprogramming.dll
Syntax
public abstract class ExpressionBuilder<TExpression> : ISupplier<TExpression>, IFunctional<Func<TExpression>> where TExpression : Expression
Type Parameters
Name | Description |
---|---|
TExpression | Type of expression to be constructed. |
Remarks
Any derived expression builder is not thread-safe and event cannot be shared between threads.
Methods
| Edit this page View SourceEnd()
Finalizes construction of the expression and adds constructed expression as statement to the entire lexical scope.
Declaration
public void End()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The expression has been constructed already. |
OfType(Type)
Changes type of the expression.
Declaration
public ExpressionBuilder<TExpression> OfType(Type expressionType)
Parameters
Type | Name | Description |
---|---|---|
Type | expressionType | The expression type. |
Returns
Type | Description |
---|---|
ExpressionBuilder<TExpression> | This builder. |
Remarks
By default, type of expression is void.
OfType<T>()
Changes type of the expression.
Declaration
public ExpressionBuilder<TExpression> OfType<T>()
Returns
Type | Description |
---|---|
ExpressionBuilder<TExpression> | This builder. |
Type Parameters
Name | Description |
---|---|
T | The expression type. |