@@ -237,7 +237,10 @@ private enum TryBlockEvaluatedState
237
237
{
238
238
new Dictionary < ExpressionOperator , Func < dynamic , dynamic , object > > ( )
239
239
{
240
- { ExpressionOperator . Indexing , ( dynamic left , dynamic right ) => left is IDictionary < string , object > dictionaryLeft ? dictionaryLeft [ right ] : left [ right ] } ,
240
+ { ExpressionOperator . Indexing , ( dynamic left , dynamic right ) => {
241
+ return left is IDictionary < string , object > dictionaryLeft ? dictionaryLeft [ right ] : left [ right ] ;
242
+ }
243
+ } ,
241
244
{ ExpressionOperator . IndexingWithNullConditional , ( dynamic left , dynamic right ) => left is IDictionary < string , object > dictionaryLeft ? dictionaryLeft [ right ] : left ? [ right ] } ,
242
245
} ,
243
246
new Dictionary < ExpressionOperator , Func < dynamic , dynamic , object > > ( )
@@ -486,29 +489,6 @@ private StringComparer StringComparerForCasing
486
489
/// </summary>
487
490
public bool OptionFluidPrefixingActive { get ; set ; } = true ;
488
491
489
- /// <summary>
490
- /// if <c>true</c> allow to create instance of object with the C# syntax new ClassName(...).
491
- /// if <c>false</c> unactive this functionality.
492
- /// By default : true
493
- /// </summary>
494
- public bool OptionNewKeywordEvaluationActive { get ; set ; } = true ;
495
-
496
- /// <summary>
497
- /// if <c>true</c> allow the use of inline namespace (Can be slow, and is less secure).
498
- /// if <c>false</c> unactive inline namespace (only namespaces in Namespaces list are available).
499
- /// By default : true
500
- /// </summary>
501
- public bool OptionInlineNamespacesEvaluationActive
502
- {
503
- get { return optionInlineNamespacesEvaluationActive ; }
504
- set
505
- {
506
- optionInlineNamespacesEvaluationActive = value ;
507
- instanceCreationWithNewKeywordRegex = new Regex ( InstanceCreationWithNewKeywordRegexPattern , ( optionCaseSensitiveEvaluationActive ? RegexOptions . None : RegexOptions . IgnoreCase ) ) ;
508
- castRegex = new Regex ( CastRegexPattern , ( optionCaseSensitiveEvaluationActive ? RegexOptions . None : RegexOptions . IgnoreCase ) ) ;
509
- }
510
- }
511
-
512
492
private Func < ExpressionEvaluator , List < string > , object > newMethodMem ;
513
493
514
494
/// <summary>
@@ -534,6 +514,29 @@ public bool OptionNewFunctionEvaluationActive
534
514
}
535
515
}
536
516
517
+ /// <summary>
518
+ /// if <c>true</c> allow to create instance of object with the C# syntax new ClassName(...).
519
+ /// if <c>false</c> unactive this functionality.
520
+ /// By default : true
521
+ /// </summary>
522
+ public bool OptionNewKeywordEvaluationActive { get ; set ; } = true ;
523
+
524
+ /// <summary>
525
+ /// if <c>true</c> allow the use of inline namespace (Can be slow, and is less secure).
526
+ /// if <c>false</c> unactive inline namespace (only namespaces in Namespaces list are available).
527
+ /// By default : true
528
+ /// </summary>
529
+ public bool OptionInlineNamespacesEvaluationActive
530
+ {
531
+ get { return optionInlineNamespacesEvaluationActive ; }
532
+ set
533
+ {
534
+ optionInlineNamespacesEvaluationActive = value ;
535
+ instanceCreationWithNewKeywordRegex = new Regex ( InstanceCreationWithNewKeywordRegexPattern , ( optionCaseSensitiveEvaluationActive ? RegexOptions . None : RegexOptions . IgnoreCase ) ) ;
536
+ castRegex = new Regex ( CastRegexPattern , ( optionCaseSensitiveEvaluationActive ? RegexOptions . None : RegexOptions . IgnoreCase ) ) ;
537
+ }
538
+ }
539
+
537
540
/// <summary>
538
541
/// if <c>true</c> allow to call static methods on classes.
539
542
/// if <c>false</c> unactive this functionality.
0 commit comments