sdk/dotnet/src/Microsoft.Datasync.Client/Query/Linq/FilterBuildingExpressionVisitor.cs
/// <summary>
/// Gets the table member name referenced by an expression, or return null.
/// </summary>
/// <param name="expression">The expression to check</param>
/// <param name="contractResolver">The contract resolvers to use to determine property names from members used with expressions.</param>
/// <returns>the table member name</returns>
Gets the table member name referenced by an expression, or return null.
Gets the table member name referenced by an expression or return null .
internal static string GetTableMemberName(Expression expression, DatasyncContractResolver contractResolver)
        {
            Arguments.IsNotNull(expression, nameof(expression));
            Arguments.IsNotNull(contractResolver, nameof(contractResolver));
            if (expression is MemberExpression member && member.Expression.NodeType == ExpressionType.Parameter)
            {
                JsonProperty property = contractResolver.ResolveProperty(member.Member);
                return property.PropertyName;
            }
            return null;
        }
internal static string GetTableMemberName ( Expression expression , DatasyncContractResolver contractResolver ) { Arguments . IsNotNull ( expression , nameof ( expression ) ) ; Arguments . IsNotNull ( contractResolver , nameof ( contractResolver ) ) ; if ( expression is MemberExpression member && member . Expression . NodeType == ExpressionType . Parameter ) { JsonProperty property = contractResolver . ResolveProperty ( member . Member ) ; return property . PropertyName ; } return null ; }
Gets the table member name referenced by an expression, or return null.
Gets the table member name referenced by an expression or return null .
the table member name
the table member name
expression
Expression
The expression to check
The expression to check
contractResolver
DatasyncContractResolver
The contract resolvers to use to determine property names from members used with expressions.
The contract resolvers to use to determine property names from members used with expressions .