Search Results for

    Show / Hide Table of Contents

    Class ParsingConfig

    Configuration class for System.Linq.Dynamic.Core.

    Inheritance
    System.Object
    ParsingConfig
    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 class ParsingConfig

    Properties

    | Improve this Doc View Source

    AllowNewToEvaluateAnyType

    Allows the New() keyword to evaluate any available Type.

    Default value is false.

    Declaration
    public bool AllowNewToEvaluateAnyType { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    AreContextKeywordsEnabled

    Determines if the context keywords (it, parent, and root) are valid and usable inside a Dynamic Linq string expression.
    Does not affect the usability of the equivalent context symbols ($, ^ and ~).

    Default value is false.

    Declaration
    public bool AreContextKeywordsEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ConstantExpressionCacheConfig

    Caches constant expressions to enhance performance. Periodic cleanup is performed to manage cache size, governed by this configuration.

    Declaration
    public CacheConfig ConstantExpressionCacheConfig { get; set; }
    Property Value
    Type Description
    CacheConfig
    | Improve this Doc View Source

    ConvertObjectToSupportComparison

    Converts typeof(object) to the correct type to allow comparison (Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan and LessThanEqual).

    Default value is false.

    When set to true, the following code will work correct:

    class Person
    {
        public string Name { get; set; }
        public object Age { get; set; }
    }
    
    var persons = new[]
    {
        new Person { Name = "Foo", Age = 99 },
        new Person { Name = "Bar", Age = 33 }
    }.AsQueryable();
    
    var config = new ParsingConfig
    {
        ConvertObjectToSupportComparison = true
    };
    
    var results = persons.Where(config, "Age > 50").ToList();
    Declaration
    public bool ConvertObjectToSupportComparison { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CustomTypeProvider

    Gets or sets the IDynamicLinkCustomTypeProvider.

    Declaration
    public IDynamicLinkCustomTypeProvider CustomTypeProvider { get; set; }
    Property Value
    Type Description
    IDynamicLinkCustomTypeProvider
    | Improve this Doc View Source

    DateTimeIsParsedAsUTC

    By default, a DateTime (like 'Fri, 10 May 2019 11:03:17 GMT') is parsed as local time. Use this flag to parse all DateTime strings as UTC.

    Default value is false.

    Declaration
    public bool DateTimeIsParsedAsUTC { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Default

    Default ParsingConfig

    Declaration
    public static ParsingConfig Default { get; }
    Property Value
    Type Description
    ParsingConfig
    | Improve this Doc View Source

    DefaultCosmosDb

    Default ParsingConfig for CosmosDb

    Declaration
    public static ParsingConfig DefaultCosmosDb { get; }
    Property Value
    Type Description
    ParsingConfig
    | Improve this Doc View Source

    DefaultEFCore21

    Default ParsingConfig for EntityFramework Core 2.1 and higher

    Declaration
    public static ParsingConfig DefaultEFCore21 { get; }
    Property Value
    Type Description
    ParsingConfig
    | Improve this Doc View Source

    DisableMemberAccessToIndexAccessorFallback

    By default, when a member is not found in a type and the type has a string based index accessor it will be parsed as an index accessor. Use this flag to disable this behaviour and have parsing fail when parsing an expression where a member access on a non-existing member happens.

    Default value is false.

    Declaration
    public bool DisableMemberAccessToIndexAccessorFallback { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    DisallowNewKeyword

    Disallows the New() keyword to be used to construct a class.

    Default value is false.

    Declaration
    public bool DisallowNewKeyword { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    EvaluateGroupByAtDatabase

    Gets or sets a value indicating whether the EntityFramework version supports evaluating GroupBy at database level. See https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-2.1#linq-groupby-translation Remark: when this setting is set to true, make sure to supply this ParsingConfig as first parameter on the extension methods.

    Default value is false.

    Declaration
    public bool EvaluateGroupByAtDatabase { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ExpressionPromoter

    Gets or sets the IExpressionPromoter.

    Declaration
    public IExpressionPromoter ExpressionPromoter { get; set; }
    Property Value
    Type Description
    IExpressionPromoter
    | Improve this Doc View Source

    IsCaseSensitive

    Gets or sets if parameter, method, and properties resolution should be case-sensitive or not.

    Default value is false.

    Declaration
    public bool IsCaseSensitive { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    LoadAdditionalAssembliesFromCurrentDomainBaseDirectory

    Load additional assemblies from the current domain base directory. Note: only used when full .NET Framework and .NET Core App 2.x and higher.

    Default value is false.

    Declaration
    public bool LoadAdditionalAssembliesFromCurrentDomainBaseDirectory { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    NullPropagatingUseDefaultValueForNonNullableValueTypes

    When using the NullPropagating function np(...), use a "default value" for non-nullable value types instead of "null value".

    Default value is false.

    Declaration
    public bool NullPropagatingUseDefaultValueForNonNullableValueTypes { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    NumberParseCulture

    The number parsing culture.

    Default value is CultureInfo.InvariantCulture

    Declaration
    public CultureInfo NumberParseCulture { get; set; }
    Property Value
    Type Description
    System.Globalization.CultureInfo
    | Improve this Doc View Source

    PrioritizePropertyOrFieldOverTheType

    When the type and property have the same name the parser takes the property instead of type when this setting is set to true. This setting is also used for calling ExtensionMethods.

    Default value is true.

    Declaration
    public bool PrioritizePropertyOrFieldOverTheType { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    QueryableAnalyzer

    Gets or sets the IQueryableAnalyzer.

    Declaration
    public IQueryableAnalyzer QueryableAnalyzer { get; set; }
    Property Value
    Type Description
    IQueryableAnalyzer
    | Improve this Doc View Source

    RenameEmptyParameterExpressionNames

    Prevents any System.Linq.Expressions.ParameterExpression.Name value from being empty by substituting a random 16 character word.

    Default value is false.

    Declaration
    public bool RenameEmptyParameterExpressionNames { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    RenameParameterExpression

    Renames the (Typed)ParameterExpression empty Name to the correct supplied name from it.

    Default value is false.

    Declaration
    public bool RenameParameterExpression { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ResolveTypesBySimpleName

    By default, finding types by a simple name is not supported. Use this flag to use the CustomTypeProvider to resolve types by a simple name like "Employee" instead of "MyDatabase.Entities.Employee". Note that a first matching type is returned and this functionality needs to scan all types from all assemblies, so use with caution.

    Default value is false.

    Declaration
    public bool ResolveTypesBySimpleName { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    StringLiteralParsing

    Defines the type of string literal parsing that will be performed. Default value is StringLiteralParsingType.Default.

    Declaration
    public StringLiteralParsingType StringLiteralParsing { get; set; }
    Property Value
    Type Description
    StringLiteralParsingType
    | Improve this Doc View Source

    SupportCastingToFullyQualifiedTypeAsString

    Support casting to a full qualified type using a string (double-quoted value).

    var result = queryable.Select($"\"System.DateTime\"(LastUpdate)");

    Default value is true.

    Declaration
    public bool SupportCastingToFullyQualifiedTypeAsString { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SupportDotInPropertyNames

    Support a "." in a property-name. Used in the 'new (a.b as a.b)' syntax.

    Default value is false.

    Declaration
    public bool SupportDotInPropertyNames { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SupportEnumerationsFromSystemNamespace

    Support enumeration-types from the System namespace in mscorlib. An example could be "StringComparison".

    Default value is true.

    Declaration
    public bool SupportEnumerationsFromSystemNamespace { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TypeConverters

    Additional TypeConverters

    Declaration
    public IDictionary<Type, TypeConverter> TypeConverters { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.Type, System.ComponentModel.TypeConverter>
    | Improve this Doc View Source

    UseParameterizedNamesInDynamicQuery

    Use Parameterized Names in generated dynamic SQL query. See https://github.com/graeme-hill/gblog/blob/master/source_content/articles/2014.139_entity-framework-dynamic-queries-and-parameterization.mkd

    Default value is false.

    Declaration
    public bool UseParameterizedNamesInDynamicQuery { get; set; }
    Property Value
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX