Class DefaultQueryExpressionFactory
Default factory to create query expressions.
Implements
Inherited Members
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public class DefaultQueryExpressionFactory : QueryExpressionFactoryBase, IQueryExpressionFactory
Constructors
DefaultQueryExpressionFactory()
Constructs a default query expression factory.
Declaration
protected DefaultQueryExpressionFactory()
Properties
Instance
Gets an instance of the default query expression factory.
Declaration
public static DefaultQueryExpressionFactory Instance { get; }
Property Value
Type | Description |
---|---|
DefaultQueryExpressionFactory |
Methods
First(MonadMember)
Creates a FirstOperator that represents a first operator using type inference where needed.
Declaration
public FirstOperator First(MonadMember source)
Parameters
Type | Name | Description |
---|---|---|
MonadMember | source | The monad from which to get the first element. |
Returns
Type | Description |
---|---|
FirstOperator | A FirstOperator that has the given source. |
First(MonadMember, QueryTree)
Creates a FirstPredicateOperator that represents a first operator with a predicate using type inference where needed.
Declaration
public FirstPredicateOperator First(MonadMember source, QueryTree predicate)
Parameters
Type | Name | Description |
---|---|---|
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. |
First(Type, MonadMember)
Creates a FirstOperator that represents a first operator.
Declaration
public override 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. |
Overrides
First(Type, MonadMember, QueryTree)
Creates a FirstPredicateOperator that represents a first operator with a predicate.
Declaration
public override 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. |
Overrides
MakeFirst(Type, MonadMember)
Creates a FirstOperator that represents a first operator.
Declaration
protected virtual FirstOperator MakeFirst(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. |
MakeFirstPredicate(Type, MonadMember, QueryTree)
Creates a FirstPredicateOperator that represents a first operator with a predicate.
Declaration
protected virtual FirstPredicateOperator MakeFirstPredicate(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. |
MakeSelect(Type, Type, MonadMember, QueryTree)
Creates a SelectOperator that represents a select operator.
Declaration
protected virtual SelectOperator MakeSelect(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. |
MakeTake(Type, MonadMember, QueryTree)
Creates a FirstOperator that represents a take operator.
Declaration
protected virtual TakeOperator MakeTake(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. |
MakeWhere(Type, MonadMember, QueryTree)
Creates a WhereOperator that represents a where operator.
Declaration
protected virtual WhereOperator MakeWhere(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. |
Select(MonadMember, QueryTree)
Creates a SelectOperator that represents a select operator using type inference where needed.
Declaration
public SelectOperator Select(MonadMember source, QueryTree selector)
Parameters
Type | Name | Description |
---|---|---|
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. |
Select(Type, Type, MonadMember, QueryTree)
Creates a SelectOperator that represents a select operator.
Declaration
public override 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. |
Overrides
Take(MonadMember, QueryTree)
Creates a FirstOperator that represents a take operator using type inference where needed.
Declaration
public TakeOperator Take(MonadMember source, QueryTree count)
Parameters
Type | Name | Description |
---|---|---|
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. |
Take(Type, MonadMember, QueryTree)
Creates a FirstOperator that represents a take operator.
Declaration
public override 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. |
Overrides
Where(MonadMember, QueryTree)
Creates a WhereOperator that represents a where operator using type inference where needed.
Declaration
public WhereOperator Where(MonadMember source, QueryTree predicate)
Parameters
Type | Name | Description |
---|---|---|
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. |
Where(Type, MonadMember, QueryTree)
Creates a WhereOperator that represents a where operator.
Declaration
public override 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. |