Class IvExpressionParser<TElement, TQuery, TFilter>
Inheritance
System.Object
IvExpressionParser<TElement, TQuery, TFilter>
Assembly: ImageVault.Client.dll
Syntax
public abstract class IvExpressionParser<TElement, TQuery, TFilter> : ExpressionVisitor, IIvExpressionParser<TQuery>, IIvExpressionParser where TQuery : IIVQuery<TFilter>, new()
where TFilter : IIVFilter
Type Parameters
Name |
Description |
TElement |
|
TQuery |
|
TFilter |
|
Constructors
IvExpressionParser()
Initializes a new instance of the IvExpressionParser<TElement, TQuery> class.
Declaration
protected IvExpressionParser()
Properties
Client
Get/Sets the Client of the IvExpressionParser
Declaration
public IClient Client { get; set; }
Property Value
ElementType
Gets the ElementType of the IvExpressionParser
Declaration
protected Type ElementType { get; }
Property Value
Type |
Description |
System.Type |
|
Query
Get/Sets the Query of the IvExpressionParser
Declaration
public TQuery Query { get; }
Property Value
Methods
AddMapping<TKey>(IvQueryMapping, Expression<Func<TElement, TKey>>, Func<Expression, IList<Expression>, Expression>)
Adds a mapping to the parser
Declaration
protected void AddMapping<TKey>(IvQueryMapping mapping, Expression<Func<TElement, TKey>> selector, Func<Expression, IList<Expression>, Expression> action)
Parameters
Type |
Name |
Description |
IvQueryMapping |
mapping |
The IvQueryMapping type to add
|
System.Linq.Expressions.Expression<System.Func<TElement, TKey>> |
selector |
The expression that is used to identitfy the source mapping
|
System.Func<System.Linq.Expressions.Expression, System.Collections.Generic.IList<System.Linq.Expressions.Expression>, System.Linq.Expressions.Expression> |
action |
The action to execute if the source mapping is encountered
|
Type Parameters
Exceptions
Type |
Condition |
System.ApplicationException |
If a mapping for a specific mapping and selector already has been added.
|
CheckIfBinaryExpressionIsValid(ExpressionType)
Checks if the supplied binary expression is valid or not.
Declaration
protected virtual bool CheckIfBinaryExpressionIsValid(ExpressionType type)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.ExpressionType |
type |
|
Returns
Type |
Description |
System.Boolean |
|
GetMappings(IvQueryMapping)
Declaration
protected IEnumerable<KeyValuePair<string, Func<Expression, IList<Expression>, Expression>>> GetMappings(IvQueryMapping mapping)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Func<System.Linq.Expressions.Expression, System.Collections.Generic.IList<System.Linq.Expressions.Expression>, System.Linq.Expressions.Expression>>> |
|
GetResultFromServer(Type)
Gets the result from the server
Declaration
public abstract IQueryable GetResultFromServer(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
The System.Type of items for the result to get
|
Returns
Type |
Description |
System.Linq.IQueryable |
An System.Linq.IQueryable containing the result
|
IsSpecificMemberExpression<TKey>(Expression, Expression<Func<TElement, TKey>>)
Checks if a specific expression is a specific member expression matching a specific property/field/method
Declaration
protected bool IsSpecificMemberExpression<TKey>(Expression exp, Expression<Func<TElement, TKey>> selector)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression |
exp |
The System.Linq.Expressions.Expression to check
|
System.Linq.Expressions.Expression<System.Func<TElement, TKey>> |
selector |
The System.Linq.Expressions.Expression<> pointing out the member
|
Returns
Type |
Description |
System.Boolean |
True if specific member is expression, otherwise false.
|
Type Parameters
Name |
Description |
TKey |
The type of return value of the member
|
VisitBinary(BinaryExpression)
Declaration
protected override Expression VisitBinary(BinaryExpression be)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.BinaryExpression |
be |
|
Returns
Type |
Description |
System.Linq.Expressions.Expression |
|
Overrides
VisitMemberAccess(MemberExpression)
Declaration
protected override Expression VisitMemberAccess(MemberExpression m)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.MemberExpression |
m |
|
Returns
Type |
Description |
System.Linq.Expressions.Expression |
|
Overrides
VisitMethodCall(MethodCallExpression)
Declaration
protected override Expression VisitMethodCall(MethodCallExpression m)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.MethodCallExpression |
m |
|
Returns
Type |
Description |
System.Linq.Expressions.Expression |
|
Overrides
VisitUnary(UnaryExpression)
Declaration
protected override Expression VisitUnary(UnaryExpression u)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.UnaryExpression |
u |
|
Returns
Type |
Description |
System.Linq.Expressions.Expression |
|
Overrides
Implements
Extension Methods