ResolveMemberExpression() public method

public ResolveMemberExpression ( SqlColumnExpression sqlColumnExpression, MemberInfo memberInfo ) : Expression
sqlColumnExpression Remotion.Linq.SqlBackend.SqlStatementModel.Resolved.SqlColumnExpression
memberInfo System.Reflection.MemberInfo
return System.Linq.Expressions.Expression
コード例 #1
0
        private static KeyValuePair <string, object>[] TryResolveProperty(
            MappingResolverStub mappingResolver, SqlEntityExpression sqlEntityDefinition, PropertyInfo member, object entity)
        {
            Expression expression;

            try
            {
                expression = mappingResolver.ResolveMemberExpression(sqlEntityDefinition, member);
            }
            catch (UnmappedItemException)
            {
                return(new KeyValuePair <string, object> [0]);
            }

            var memberValue = member.GetValue(entity, null);

            return(TryResolvePropertyExpression(mappingResolver, expression, memberValue).ToArray());
        }
    private static KeyValuePair<string, object>[] TryResolveProperty (
        MappingResolverStub mappingResolver, SqlEntityExpression sqlEntityDefinition, PropertyInfo member, object entity)
    {
      Expression expression;
      try
      {
        expression = mappingResolver.ResolveMemberExpression (sqlEntityDefinition, member);
      }
      catch (UnmappedItemException)
      {
        return new KeyValuePair<string, object>[0];
      }

      var memberValue = member.GetValue (entity, null);
      return TryResolvePropertyExpression(mappingResolver, expression, memberValue).ToArray();
    }