Lingua

RuntimeConstantExpression Class

Definition

A node containing an expression expressing the retrieval of a value which doesn't change across executions of the query.

[System.Diagnostics.CodeAnalysis.Experimental("EF9100")]
[System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")]
[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeConstantExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
[<System.Diagnostics.CodeAnalysis.Experimental("EF9100")>]
[<System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeConstantExpression = class
    inherit Expression
    interface IPrintableExpression
Public Class RuntimeConstantExpression
Inherits Expression
Implements IPrintableExpression
Inheritance
RuntimeConstantExpression
Attributes
Implements

Remarks

When the expression tree is compiled, the value will be retrieved from the expression, and a ConstantExpression expression can directly reference the result.

When the expression tree is translated to source code instead (in query pre-compilation), the expression can be rendered out separately, to be assigned to a private static readonly field, and this node is replaced by a reference to that field.

Constructors

Name Description
RuntimeConstantExpression(String, Expression)

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Name Description
CanReduce

Indicates that the node can be reduced to a simpler node. If this returns true, Reduce() can be called to produce the reduced form.

InitializeExpression

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Name

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

NodeType

Gets the node type of this Expression.

Type

Gets the static type of the expression that this Expression represents.

Value

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Methods

Name Description
Print(ExpressionPrinter)

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Reduce()

Reduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node that itself must be reduced.

Update(Expression)

This is an experimental API used by the Entity Framework Core feature and it is not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

VisitChildren(ExpressionVisitor)

Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.

Applies to