Class ItemIndexExpression
Expresses construction of Index value.
Inherited Members
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class ItemIndexExpression : CustomExpression
Constructors
| Improve this Doc View SourceItemIndexExpression(Expression, Boolean)
Initializes a new index.
Declaration
public ItemIndexExpression(Expression value, bool fromEnd = false)
Parameters
Type | Name | Description |
---|---|---|
Expression | value | The index value. |
Boolean | 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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
Boolean | true if the Index is from the end; otherwise, false. |
Type
Gets result type of asynchronous operation.
Declaration
public override Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Overrides
| Improve this Doc View SourceValue
Gets the offset value.
Declaration
public Expression Value { get; }
Property Value
Type | Description |
---|---|
Expression | The offset value. |
Methods
| Improve this Doc 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
| Improve this Doc View SourceVisitChildren(ExpressionVisitor)
Visit children expressions.
Declaration
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
ExpressionVisitor | visitor | Expression visitor. |
Returns
Type | Description |
---|---|
Expression | Potentially modified expression if one of children expressions is modified during visit. |