Show / Hide Table of Contents

Class UnsafeQueryExpressionFactory

A factory to create query expressions without doing argument validation.

Inheritance
System.Object
UnsafeQueryExpressionFactory
Implements
IQueryExpressionFactory
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public sealed class UnsafeQueryExpressionFactory : Object, IQueryExpressionFactory

Constructors

UnsafeQueryExpressionFactory()

Declaration
public UnsafeQueryExpressionFactory()

Properties

Instance

Gets an instance of an unsafe query expression factory.

Declaration
public static UnsafeQueryExpressionFactory Instance { get; }
Property Value
Type Description
UnsafeQueryExpressionFactory

Methods

First(Type, MonadMember)

Creates a FirstOperator that represents a first operator.

Declaration
public 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 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, 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.

Select(Type, Type, MonadMember, QueryTree)

Creates a SelectOperator that represents a select operator.

Declaration
public 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 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 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