Class AsyncResultExpression
Represents return from asynchronous lambda function.
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class AsyncResultExpression : Expression
Remarks
This expression turns async state machine into final state.
Constructors
| Improve this Doc View SourceAsyncResultExpression(Expression, Boolean)
Constructs non-void return from asynchronous lambda function.
Declaration
public AsyncResultExpression(Expression result, bool valueTask)
Parameters
Type | Name | Description |
---|---|---|
Expression | result | An expression representing result to be returned from asynchronous lambda function. |
Boolean | valueTask | true, to represent the result as |
AsyncResultExpression(Boolean)
Constructs void return from asynchronous lambda function.
Declaration
public AsyncResultExpression(bool valueTask)
Parameters
Type | Name | Description |
---|---|---|
Boolean | valueTask | true, to represent the result as |
Properties
| Improve this Doc View SourceAsyncResult
An expression representing result to be returned from asynchronous lambda function.
Declaration
public Expression AsyncResult { get; }
Property Value
Type | Description |
---|---|
Expression |
CanReduce
Indicates that this expression can be reduced to well-known LINQ expression.
Declaration
public override bool CanReduce { get; }
Property Value
Type | Description |
---|---|
Boolean |
NodeType
Expression type. Always returns
Declaration
public override ExpressionType NodeType { get; }
Property Value
Type | Description |
---|---|
ExpressionType |
Type
Type of this expression.
Declaration
public override Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Remarks
The type of this expression is
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. |
VisitChildren(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. |