Search Results for

    Show / Hide Table of Contents

    Class DynamicExpressionParser

    Helper class to convert an expression into an LambdaExpression

    Inheritance
    System.Object
    DynamicExpressionParser
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: System.Linq.Dynamic.Core
    Assembly: System.Linq.Dynamic.Core.dll
    Syntax
    public static class DynamicExpressionParser

    Methods

    | Improve this Doc View Source

    ParseLambda(Boolean, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(bool createParameterCtor, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Boolean, Type, Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(bool createParameterCtor, Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, Boolean, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, bool createParameterCtor, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, Boolean, Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, bool createParameterCtor, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, Boolean, Type, Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, bool createParameterCtor, Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParsingConfig, Type, Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParsingConfig parsingConfig, Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, Boolean, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, Boolean, Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, Boolean, Type, Type, String, Object[])

    Parses an expression into a LambdaExpression.

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParsingConfig, Type, Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParsingConfig parsingConfig, Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, ParameterExpression[], Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type delegateType, ParameterExpression[] parameters, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda(Type, Type, String, Object[])

    Parses an expression into a LambdaExpression. (Also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.)

    Declaration
    [PublicAPI]
    public static LambdaExpression ParseLambda(Type itType, Type resultType, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type itType

    The main type from the dynamic class expression.

    System.Type resultType

    Type of the result. If not specified, it will be generated dynamically.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.LambdaExpression

    The generated System.Linq.Expressions.LambdaExpression

    | Improve this Doc View Source

    ParseLambda<TResult>(ParsingConfig, Boolean, ParameterExpression[], String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<TResult>> ParseLambda<TResult>(ParsingConfig parsingConfig, bool createParameterCtor, ParameterExpression[] parameters, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    TResult

    The type of the result.

    | Improve this Doc View Source

    ParseLambda<TResult>(ParsingConfig, Boolean, String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<TResult>> ParseLambda<TResult>(ParsingConfig parsingConfig, bool createParameterCtor, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    TResult

    The type of the result.

    | Improve this Doc View Source

    ParseLambda<TResult>(Type, ParsingConfig, Boolean, ParameterExpression[], String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<TResult>> ParseLambda<TResult>(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, ParameterExpression[] parameters, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.Linq.Expressions.ParameterExpression[] parameters

    A array from ParameterExpressions.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    TResult

    The type of the result.

    | Improve this Doc View Source

    ParseLambda<TResult>(Type, ParsingConfig, Boolean, String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<TResult>> ParseLambda<TResult>(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    TResult

    The type of the result.

    | Improve this Doc View Source

    ParseLambda<T, TResult>(ParsingConfig, Boolean, String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<T, TResult>> ParseLambda<T, TResult>(ParsingConfig parsingConfig, bool createParameterCtor, string expression, params object[] values)
    Parameters
    Type Name Description
    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<T, TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    T

    The it-Type.

    TResult

    The type of the result.

    | Improve this Doc View Source

    ParseLambda<T, TResult>(Type, ParsingConfig, Boolean, String, Object[])

    Parses an expression into a Typed Expression.

    Declaration
    [PublicAPI]
    public static Expression<Func<T, TResult>> ParseLambda<T, TResult>(Type delegateType, ParsingConfig parsingConfig, bool createParameterCtor, string expression, params object[] values)
    Parameters
    Type Name Description
    System.Type delegateType

    The delegate type.

    ParsingConfig parsingConfig

    The Configuration for the parsing.

    System.Boolean createParameterCtor

    if set to true then also create a constructor for all the parameters. Note that this doesn't work for Linq-to-Database entities.

    System.String expression

    The expression.

    System.Object[] values

    An object array that contains zero or more objects which are used as replacement values.

    Returns
    Type Description
    System.Linq.Expressions.Expression<System.Func<T, TResult>>

    The generated System.Linq.Expressions.Expression

    Type Parameters
    Name Description
    T

    The it-Type.

    TResult

    The type of the result.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX