Class ParsingConfig
Configuration class for System.Linq.Dynamic.Core.
Inherited Members
Namespace: System.Linq.Dynamic.Core
Assembly: System.Linq.Dynamic.Core.dll
Syntax
public class ParsingConfig
Properties
| Improve this Doc View SourceAllowNewToEvaluateAnyType
Allows the New() keyword to evaluate any available Type.
Default value is false.
Declaration
public bool AllowNewToEvaluateAnyType { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
CustomTypeProvider
Gets or sets the IDynamicLinkCustomTypeProvider.
Declaration
public IDynamicLinkCustomTypeProvider CustomTypeProvider { get; set; }
Property Value
| Type | Description |
|---|---|
| IDynamicLinkCustomTypeProvider |
DateTimeIsParsedAsUTC
By default 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 |
|---|---|
| Boolean |
Default
Default ParsingConfig
Declaration
public static ParsingConfig Default { get; }
Property Value
| Type | Description |
|---|---|
| ParsingConfig |
DefaultCosmosDb
Default ParsingConfig for CosmosDb
Declaration
public static ParsingConfig DefaultCosmosDb { get; }
Property Value
| Type | Description |
|---|---|
| ParsingConfig |
DefaultEFCore21
Default ParsingConfig for EntityFramework Core 2.1 and higher
Declaration
public static ParsingConfig DefaultEFCore21 { get; }
Property Value
| Type | Description |
|---|---|
| ParsingConfig |
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 |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
ExpressionPromoter
Gets or sets the IExpressionPromoter.
Declaration
public IExpressionPromoter ExpressionPromoter { get; set; }
Property Value
| Type | Description |
|---|---|
| IExpressionPromoter |
IsCaseSensitive
Gets or sets if parameter, method, and properties resolution should be case sensitive or not (false by default).
Declaration
public bool IsCaseSensitive { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
NumberParseCulture
The number parsing culture.
Default value is CultureInfo.InvariantCulture
Declaration
public CultureInfo NumberParseCulture { get; set; }
Property Value
| Type | Description |
|---|---|
| CultureInfo |
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 |
|---|---|
| Boolean |
QueryableAnalyzer
Gets or sets the IQueryableAnalyzer.
Declaration
public IQueryableAnalyzer QueryableAnalyzer { get; set; }
Property Value
| Type | Description |
|---|---|
| IQueryableAnalyzer |
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 |
|---|---|
| Boolean |
RenameParameterExpression
Renames the (Typed)ParameterExpression empty Name to a the correct supplied name from it.
Default value is false.
Declaration
public bool RenameParameterExpression { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
TypeConverters
Additional TypeConverters
Declaration
public IDictionary<Type, TypeConverter> TypeConverters { get; set; }
Property Value
| Type | Description |
|---|---|
| IDictionary<Type, TypeConverter> |
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 |
|---|---|
| Boolean |