Class ItemIndexExpression
Expresses construction of Index value.
Inherited Members
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class ItemIndexExpression : CustomExpression
Constructors
| Edit this page View SourceItemIndexExpression(Expression, bool)
Initializes a new index.
Declaration
public ItemIndexExpression(Expression value, bool fromEnd = false)
Parameters
Type | Name | Description |
---|---|---|
Expression | value | The index value. |
bool | fromEnd | A boolean indicating if the index is from the start (false) or from the end (true) of a collection. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
Fields
| Edit this page View SourceFirst
The index of the first item in the collection.
Declaration
public static readonly ItemIndexExpression First
Field Value
Type | Description |
---|---|
ItemIndexExpression |
Last
The index of the last item in the collection.
Declaration
public static readonly ItemIndexExpression Last
Field Value
Type | Description |
---|---|
ItemIndexExpression |
Properties
| Edit this page View SourceIsFromEnd
Gets a value that indicates whether the index is from the start or the end.
Declaration
public bool IsFromEnd { get; }
Property Value
Type | Description |
---|---|
bool |
Type
Gets result type of asynchronous operation.
Declaration
public override Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Overrides
| Edit this page View SourceValue
Gets the offset value.
Declaration
public Expression Value { get; }
Property Value
Type | Description |
---|---|
Expression | The offset value. |
Methods
| Edit this page View SourceReduce()
Translates this expression into predefined set of expressions using Lowering technique.
Declaration
public override Expression Reduce()
Returns
Type | Description |
---|---|
Expression | Translated expression. |
Overrides
| Edit this page View SourceVisitChildren(ExpressionVisitor)
Visit children expressions.
Declaration
protected override ItemIndexExpression VisitChildren(ExpressionVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
ExpressionVisitor | visitor | Expression visitor. |
Returns
Type | Description |
---|---|
ItemIndexExpression | Potentially modified expression if one of children expressions is modified during visit. |