Show / Hide Table of Contents

Class QueryExpressionFactoryBase

Base class for factories to create query expressions.

Inheritance
System.Object
QueryExpressionFactoryBase
DefaultQueryExpressionFactory
Implements
IQueryExpressionFactory
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public abstract class QueryExpressionFactoryBase : Object, IQueryExpressionFactory

Constructors

QueryExpressionFactoryBase()

Declaration
protected QueryExpressionFactoryBase()

Methods

First(Type, MonadMember)

Creates a FirstOperator that represents a first operator.

Declaration
public abstract FirstOperator First(Type elementType, MonadMember source)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

MonadMember source

The monad from which to get the first element.

Returns
Type Description
FirstOperator

A FirstOperator that has the given source.

First(Type, MonadMember, QueryTree)

Creates a FirstPredicateOperator that represents a first operator with a predicate.

Declaration
public abstract FirstPredicateOperator First(Type elementType, MonadMember source, QueryTree predicate)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

MonadMember source

The monad from which to get the first element satisfying a condition.

QueryTree predicate

The function to test each source element for a condition.

Returns
Type Description
FirstPredicateOperator

A FirstPredicateOperator that has the given source.

LambdaAbstraction(LambdaExpression)

Creates a LambdaAbstraction that abstracts over unknown query nodes and non-query nodes.

Declaration
public LambdaAbstraction LambdaAbstraction(LambdaExpression body)
Parameters
Type Name Description
System.Linq.Expressions.LambdaExpression body

The System.Linq.Expressions.LambdaExpression which represents the unknown parts of a query with holes for known sub-parts.

Returns
Type Description
LambdaAbstraction

A LambdaAbstraction with holes and parameters to fill the holes.

LambdaAbstraction(LambdaExpression, IEnumerable<QueryTree>)

Creates a LambdaAbstraction that abstracts over unknown query nodes and non-query nodes.

Declaration
public LambdaAbstraction LambdaAbstraction(LambdaExpression body, IEnumerable<QueryTree> parameters)
Parameters
Type Name Description
System.Linq.Expressions.LambdaExpression body

The System.Linq.Expressions.LambdaExpression which represents the unknown parts of a query with holes for known sub-parts.

System.Collections.Generic.IEnumerable<QueryTree> parameters

The known sub-parts of a query.

Returns
Type Description
LambdaAbstraction

A LambdaAbstraction with holes and parameters to fill the holes.

MonadAbstraction(Type, QueryTree)

Creates a MonadAbstraction that abstracts over a monad member such as a source or unknown operator.

Declaration
public MonadAbstraction MonadAbstraction(Type elementType, QueryTree inner)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

QueryTree inner

The inner monad to abstract over.

Returns
Type Description
MonadAbstraction

A MonadAbstraction that has the given monadic type.

RequireNotNull<T>(T, String)

Checks whether the argument is null.

Declaration
protected static void RequireNotNull<T>(T value, string paramName)
    where T : class
Parameters
Type Name Description
T value

The argument to check.

System.String paramName

The name of the argument.

Type Parameters
Name Description
T

The type of the argument.

RequireTypesAssignable(Type, Type, String)

Checks whether the right value can be assigned to the left value.

Declaration
protected static void RequireTypesAssignable(Type left, Type right, string paramName)
Parameters
Type Name Description
System.Type left

The value to be assigned to.

System.Type right

The value to assign from.

System.String paramName

The name of the argument.

Select(Type, Type, MonadMember, QueryTree)

Creates a SelectOperator that represents a select operator.

Declaration
public abstract SelectOperator Select(Type elementType, Type inputElementType, MonadMember source, QueryTree selector)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

System.Type inputElementType

The System.Type of the elements in the source monad.

MonadMember source

The monad to invoke a transform function on.

QueryTree selector

A transform function to apply to each source element.

Returns
Type Description
SelectOperator

A SelectOperator that has the given source.

Take(Type, MonadMember, QueryTree)

Creates a FirstOperator that represents a take operator.

Declaration
public abstract TakeOperator Take(Type elementType, MonadMember source, QueryTree count)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

MonadMember source

The monad to take elements from.

QueryTree count

The number of elements to return.

Returns
Type Description
TakeOperator

A FirstOperator that has the given source.

Where(Type, MonadMember, QueryTree)

Creates a WhereOperator that represents a where operator.

Declaration
public abstract WhereOperator Where(Type elementType, MonadMember source, QueryTree predicate)
Parameters
Type Name Description
System.Type elementType

The System.Type of the elements in the resulting monad.

MonadMember source

The monad whose elements to filter.

QueryTree predicate

The function to test each source element for a condition.

Returns
Type Description
WhereOperator

A WhereOperator that has the given source.

Implements

IQueryExpressionFactory
In This Article
Back to top Generated by DocFX