Show / Hide Table of Contents

Class DefaultClientQueryConverter

A default client query converter.

Inheritance
System.Object
Loggable
DefaultClientQueryConverter
Implements
ILoggable
IClientQueryConverter
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.Client.Queries.Conversion
Assembly: Kephas.Data.Client.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultClientQueryConverter : Loggable, ILoggable, IClientQueryConverter

Constructors

| Improve this Doc View Source

DefaultClientQueryConverter(ITypeResolver, IProjectedTypeResolver, ICollection<IExportFactory<IExpressionConverter, ExpressionConverterMetadata>>)

Initializes a new instance of the DefaultClientQueryConverter class.

Declaration
public DefaultClientQueryConverter(ITypeResolver typeResolver, IProjectedTypeResolver projectedTypeResolver, ICollection<IExportFactory<IExpressionConverter, ExpressionConverterMetadata>> converterFactories)
Parameters
Type Name Description
ITypeResolver typeResolver

The type resolver.

IProjectedTypeResolver projectedTypeResolver

The entity type resolver.

System.Collections.Generic.ICollection<IExportFactory<IExpressionConverter, ExpressionConverterMetadata>> converterFactories

The expression converters.

Methods

| Improve this Doc View Source

ConvertExpression(Expression, Type, ParameterExpression, IClientQueryConversionContext)

Converts the provided client expression to a LINQ expression.

Declaration
protected virtual Expression ConvertExpression(Expression expression, Type clientItemType, ParameterExpression lambdaArg, IClientQueryConversionContext context)
Parameters
Type Name Description
Expression expression

The expression.

System.Type clientItemType

The client item type.

System.Linq.Expressions.ParameterExpression lambdaArg

The lambda argument.

IClientQueryConversionContext context

The query conversion context.

Returns
Type Description
System.Linq.Expressions.Expression

The converted LINQ expression.

| Improve this Doc View Source

ConvertFilter(Type, Type, Expression, IClientQueryConversionContext)

Converts the where clause.

Declaration
protected virtual Expression ConvertFilter(Type itemType, Type clientItemType, Expression where, IClientQueryConversionContext context)
Parameters
Type Name Description
System.Type itemType

The item type.

System.Type clientItemType

The client item type.

Expression where

The where clause.

IClientQueryConversionContext context

The query conversion context.

Returns
Type Description
System.Linq.Expressions.Expression

The converted where clause.

| Improve this Doc View Source

ConvertOrder(Type, Type, Expression, IClientQueryConversionContext)

Converts the order clause.

Declaration
protected virtual IEnumerable<(string op, Expression expression)> ConvertOrder(Type itemType, Type clientItemType, Expression order, IClientQueryConversionContext context)
Parameters
Type Name Description
System.Type itemType

The item type.

System.Type clientItemType

The client item type.

Expression order

The order clause.

IClientQueryConversionContext context

The query conversion context.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<System.String, System.Linq.Expressions.Expression>>

The converted order clause.

| Improve this Doc View Source

ConvertQuery(ClientQuery, IClientQueryConversionContext)

Converts the provided client query to a queryable which can be executed.

Declaration
public virtual IQueryable ConvertQuery(ClientQuery clientQuery, IClientQueryConversionContext context)
Parameters
Type Name Description
ClientQuery clientQuery

The client query.

IClientQueryConversionContext context

The query conversion context.

Returns
Type Description
System.Linq.IQueryable

The converted query.

| Improve this Doc View Source

CreateQuery(Type, IClientQueryConversionContext)

Creates the query.

Declaration
protected virtual IQueryable CreateQuery(Type entityType, IClientQueryConversionContext context)
Parameters
Type Name Description
System.Type entityType

The entity type.

IClientQueryConversionContext context

The query conversion context.

Returns
Type Description
System.Linq.IQueryable

The new query.

| Improve this Doc View Source

GetQueryClientEntityType(ClientQuery)

Gets the query client entity type.

Declaration
protected virtual Type GetQueryClientEntityType(ClientQuery clientQuery)
Parameters
Type Name Description
ClientQuery clientQuery

The client query.

Returns
Type Description
System.Type

The query client entity type.

| Improve this Doc View Source

GetQueryEntityType(ClientQuery, Type)

Gets the query entity type based on the client entity type.

Declaration
protected virtual Type GetQueryEntityType(ClientQuery clientQuery, Type clientEntityType)
Parameters
Type Name Description
ClientQuery clientQuery

The client query.

System.Type clientEntityType

The client entity type.

Returns
Type Description
System.Type

The query entity type.

| Improve this Doc View Source

MakeConstantExpression(Object)

Makes a constant expression out of the provided argument.

Declaration
protected virtual Expression MakeConstantExpression(object arg)
Parameters
Type Name Description
System.Object arg

The argument.

Returns
Type Description
System.Linq.Expressions.Expression

A LINQ expression.

Implements

ILoggable
IClientQueryConverter

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX