| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.Collections.Generic; |
| | 5 | | using System.Linq.Expressions; |
| | 6 | | using Azure.Core; |
| | 7 | |
|
| | 8 | | namespace Azure.Data.Tables.Queryable |
| | 9 | | { |
| | 10 | | internal class ExpressionParser : LinqExpressionVisitor |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// Gets or sets the filter expression to use in the table query. |
| | 14 | | /// </summary> |
| | 15 | | /// <value>A string containing the filter expression to use in the query.</value> |
| 1372 | 16 | | public string FilterString { get; set; } |
| | 17 | |
|
| | 18 | | internal void Translate(Expression e) |
| | 19 | | { |
| 460 | 20 | | Visit(e); |
| 460 | 21 | | } |
| | 22 | |
|
| | 23 | | internal override Expression VisitLambda(LambdaExpression lambda) |
| | 24 | | { |
| 460 | 25 | | FilterString = ExpressionWriter.ExpressionToString(lambda.Body); |
| 460 | 26 | | return lambda; |
| | 27 | | } |
| | 28 | | } |
| | 29 | | } |