Class ForExpression
Represents for loop as expression.
Inherited Members
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class ForExpression : CustomExpression
Properties
| Edit this page View SourceBody
Gets body of this loop.
Declaration
public Expression Body { get; }
Property Value
| Type | Description |
|---|---|
| Expression |
BreakLabel
Gets label that is used by the loop body as a break statement target.
Declaration
public LabelTarget BreakLabel { get; }
Property Value
| Type | Description |
|---|---|
| LabelTarget |
ContinueLabel
Gets label that is used by the loop body as a continue statement target.
Declaration
public LabelTarget ContinueLabel { get; }
Property Value
| Type | Description |
|---|---|
| LabelTarget |
Initialization
Represents loop variable initialization expression.
Declaration
public Expression Initialization { get; }
Property Value
| Type | Description |
|---|---|
| Expression |
LoopVar
Represents loop variable initialized by Initialization.
Declaration
public ParameterExpression LoopVar { get; }
Property Value
| Type | Description |
|---|---|
| ParameterExpression |
Test
Represents condition of the loop continuation.
Declaration
public Expression Test { get; }
Property Value
| Type | Description |
|---|---|
| Expression |
Type
Always returns void.
Declaration
public override Type Type { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Overrides
Methods
| Edit this page View SourceBuilder(Expression)
Creates a builder of ForExpression.
Declaration
public static ForExpression.LoopBuilder Builder(Expression initialization)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression | initialization | Loop variable initialization expression. |
Returns
| Type | Description |
|---|---|
| ForExpression.LoopBuilder | A new instance of builder. |
Reduce()
Translates this expression into predefined set of expressions using Lowering technique.
Declaration
public override Expression Reduce()
Returns
| Type | Description |
|---|---|
| Expression | Translated expression. |