C# Class Microsoft.WindowsAzure.MobileServices.FilterBuildingExpressionVisitor

Create an OData filter expression by walking an expression tree.
Afficher le fichier Open project: xamarin/azure-mobile-services Class Usage Examples

Méthodes publiques

Méthode Description
Create ( Expression expression ) : string

Translate an expression tree into a compiled OData query.

Visit ( Expression node ) : Expression

Visit a node of the expression.

Méthodes protégées

Méthode Description
GetTableMember ( Expression expression ) : Microsoft.WindowsAzure.MobileServices.SerializableMember

Get the table member referenced by an expression or return null.

VisitBinary ( BinaryExpression expression ) : Expression

Process binary comparison operators.

VisitConstant ( ConstantExpression expression ) : Expression

Process constant values.

VisitMember ( MemberExpression expression ) : Expression

Process member references.

VisitMethodCall ( MethodCallExpression expression ) : Expression

Process method calls and translate them into OData.

VisitUnary ( UnaryExpression expression ) : Expression

Process the not operator.

Private Methods

Méthode Description
FilterBuildingExpressionVisitor ( ) : System
GetFilterMethodArguments ( MethodCallExpression expression, string methodName, bool isStatic ) : IEnumerable

Returns the ordered collection of arguments for the the given OData filter method given the MethodCallExpression instance.

IsConversionImplicit ( UnaryExpression expression, Type from, Type to ) : bool

Check whether a conversion from one type to another will be made implicitly by the server. This is only considered valid for member references.

This relies on the fact that all numeric types on the server are represented as doubles.

MarkVisited ( ) : void

Mark an expression as visited. This method is called when we're finished processing any expression we're accepting as a valid Mobile Services filter. Note that it must be called immediately before returning the expression (because any nested Visit calls will stomp its tracking mechanism).

StripUnaryOperator ( Expression expression ) : Expression

Remove the operator from certain unary expressions like quote or conversions we can ignore.

Method Details

Create() public static méthode

Translate an expression tree into a compiled OData query.
public static Create ( Expression expression ) : string
expression System.Linq.Expressions.Expression The expression tree.
Résultat string

GetTableMember() protected static méthode

Get the table member referenced by an expression or return null.
protected static GetTableMember ( Expression expression ) : Microsoft.WindowsAzure.MobileServices.SerializableMember
expression System.Linq.Expressions.Expression The expression to check.
Résultat Microsoft.WindowsAzure.MobileServices.SerializableMember

Visit() public méthode

Visit a node of the expression.
public Visit ( Expression node ) : Expression
node System.Linq.Expressions.Expression The node to visit.
Résultat System.Linq.Expressions.Expression

VisitBinary() protected méthode

Process binary comparison operators.
protected VisitBinary ( BinaryExpression expression ) : Expression
expression System.Linq.Expressions.BinaryExpression The expression to visit.
Résultat System.Linq.Expressions.Expression

VisitConstant() protected méthode

Process constant values.
protected VisitConstant ( ConstantExpression expression ) : Expression
expression System.Linq.Expressions.ConstantExpression The expression to visit.
Résultat System.Linq.Expressions.Expression

VisitMember() protected méthode

Process member references.
protected VisitMember ( MemberExpression expression ) : Expression
expression System.Linq.Expressions.MemberExpression The expression to visit.
Résultat System.Linq.Expressions.Expression

VisitMethodCall() protected méthode

Process method calls and translate them into OData.
protected VisitMethodCall ( MethodCallExpression expression ) : Expression
expression System.Linq.Expressions.MethodCallExpression The expression to visit.
Résultat System.Linq.Expressions.Expression

VisitUnary() protected méthode

Process the not operator.
protected VisitUnary ( UnaryExpression expression ) : Expression
expression System.Linq.Expressions.UnaryExpression The expression to visit.
Résultat System.Linq.Expressions.Expression