C# Class Microsoft.Data.Services.Toolkit.QueryModel.ODataExpressionVisitor

Parses the OData query expression tree and generates the proper ODataQueryOperation.
Inheritance: System.Linq.Expressions.ExpressionVisitor
Datei anzeigen Open project: oising/WCFDS-Toolkit Class Usage Examples

Public Methods

Method Description
Eval ( ) : ODataQueryOperation

Evaluates the OData query Expression.

ODataExpressionVisitor ( Expression expression ) : System

Initializes a new instance of the ODataExpressionVisitor class.

Protected Methods

Method Description
HandleCount ( ) : void

Enqueue a new operation tuple with the 'Count' value name.

HandleOrder ( Expression node, string methodName ) : void

Enqueue a new operation tuple with the 'Order' value name, the given expression and the method name.

HandleSelect ( Expression node ) : void

Enqueue a new operation tuple with the 'SelectMany' or 'Select' value name and the given expression.

HandleSelectMany ( Expression node ) : void

Enqueue a new operation tuple with the 'SelectMany' value name and the given expression.

HandleSkip ( Expression node ) : void

Enqueue a new operation tuple with the 'Skip' value name and the given expression.

HandleTop ( Expression node ) : void

Enqueue a new operation tuple with the 'Take' value name and the given expression.

HandleWhere ( Expression node ) : void

Enqueue a new operation tuple with the 'Where' value name and the given expression.

VisitConstant ( ConstantExpression node ) : Expression

Enqueue a new operation tuple with the 'Root' value name and the given expression.

VisitMethodCall ( MethodCallExpression node ) : Expression

Parses the MethodCallExpression to enqueue a new operation tuple based on the expression method name.

Private Methods

Method Description
CreateGetOneQuery ( Queue operations, OperationTuple item, LambdaExpression projectionExpression, Type projectionType, PropertyDetails>.IDictionary projectedProperties ) : Microsoft.Data.Services.Toolkit.QueryModel.ODataSelectOneQueryOperation
EvalForQueue ( Queue tuples ) : ODataQueryOperation

Evaluates the OperationTuple queue to return a proper ODataQueryOperation.

Method Details

Eval() public method

Evaluates the OData query Expression.
public Eval ( ) : ODataQueryOperation
return ODataQueryOperation

HandleCount() protected method

Enqueue a new operation tuple with the 'Count' value name.
protected HandleCount ( ) : void
return void

HandleOrder() protected method

Enqueue a new operation tuple with the 'Order' value name, the given expression and the method name.
protected HandleOrder ( Expression node, string methodName ) : void
node System.Linq.Expressions.Expression The operation tuple .
methodName string The method name.
return void

HandleSelect() protected method

Enqueue a new operation tuple with the 'SelectMany' or 'Select' value name and the given expression.
protected HandleSelect ( Expression node ) : void
node System.Linq.Expressions.Expression The operation tuple .
return void

HandleSelectMany() protected method

Enqueue a new operation tuple with the 'SelectMany' value name and the given expression.
protected HandleSelectMany ( Expression node ) : void
node System.Linq.Expressions.Expression The operation tuple .
return void

HandleSkip() protected method

Enqueue a new operation tuple with the 'Skip' value name and the given expression.
protected HandleSkip ( Expression node ) : void
node System.Linq.Expressions.Expression The operation tuple .
return void

HandleTop() protected method

Enqueue a new operation tuple with the 'Take' value name and the given expression.
protected HandleTop ( Expression node ) : void
node System.Linq.Expressions.Expression The operation tuple .
return void

HandleWhere() protected method

Enqueue a new operation tuple with the 'Where' value name and the given expression.
protected HandleWhere ( Expression node ) : void
node System.Linq.Expressions.Expression The operation tuple .
return void

ODataExpressionVisitor() public method

Initializes a new instance of the ODataExpressionVisitor class.
public ODataExpressionVisitor ( Expression expression ) : System
expression System.Linq.Expressions.Expression The initial to be parsed.
return System

VisitConstant() protected method

Enqueue a new operation tuple with the 'Root' value name and the given expression.
protected VisitConstant ( ConstantExpression node ) : Expression
node System.Linq.Expressions.ConstantExpression The operation tuple .
return System.Linq.Expressions.Expression

VisitMethodCall() protected method

Parses the MethodCallExpression to enqueue a new operation tuple based on the expression method name.
protected VisitMethodCall ( MethodCallExpression node ) : Expression
node System.Linq.Expressions.MethodCallExpression The node to be parsed.
return System.Linq.Expressions.Expression