Show / Hide Table of Contents

Class ToQueryTreeConverter

Base class for conversions from a source domain to the query expression tree model.

Inheritance
System.Object
ToQueryTreeConverter
MethodCallBasedOperatorToQueryTreeConverter
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public abstract class ToQueryTreeConverter : ExpressionVisitor

Constructors

ToQueryTreeConverter()

Creates the converter to the query expression tree model.

Declaration
protected ToQueryTreeConverter()

Methods

Convert(Expression)

Converts the expression to the query expression tree model.

Declaration
public QueryTree Convert(Expression expression)
Parameters
Type Name Description
System.Linq.Expressions.Expression expression

The expression to convert.

Returns
Type Description
QueryTree

The converted expression.

ConvertToMonadMember(Type, QueryTree)

Converts the query tree to a monad member by wrapping it if needed.

Declaration
protected static MonadMember ConvertToMonadMember(Type monadElementType, QueryTree queryTree)
Parameters
Type Name Description
System.Type monadElementType

The desired element type of the resulting monad.

QueryTree queryTree

The query tree to convert.

Returns
Type Description
MonadMember

The query tree as a monad member.

CreateKnownOperator(QueryTree, Type)

Creates a handle for the query tree node which is to be used to replace the node being visited.

Declaration
protected ParameterExpression CreateKnownOperator(QueryTree queryTree, Type type)
Parameters
Type Name Description
QueryTree queryTree

The query tree representing the current node.

System.Type type

The type of the current node.

Returns
Type Description
System.Linq.Expressions.ParameterExpression

A handle which is associated with the query tree replacing the current node.

VisitFromKnownOperator(Expression)

Visits the expression from an expression node which is going to be replaced by a query expression tree node. If visiting the expression doesn't return a handle to a query tree, then it is wrapped in a lambda abstraction.

Declaration
protected QueryTree VisitFromKnownOperator(Expression expression)
Parameters
Type Name Description
System.Linq.Expressions.Expression expression

The expression to visit.

Returns
Type Description
QueryTree

The result of visiting the expression. If it is a handle to a query tree, then the query tree is returned; else a lambda abstraction is returned.

In This Article
Back to top Generated by DocFX