|
1 | 1 | /******************************************************************************************************
|
2 | 2 | Title : ExpressionEvaluator (https://github.com/codingseb/ExpressionEvaluator)
|
3 |
| - Version : 1.3.2.0 |
| 3 | + Version : 1.3.2.1 |
4 | 4 | (if last digit is not a zero, the version is an intermediate version and can be unstable)
|
5 | 5 |
|
6 | 6 | Author : Coding Seb
|
@@ -489,6 +489,24 @@ private StringComparer StringComparerForCasing
|
489 | 489 | /// </summary>
|
490 | 490 | public bool OptionFluidPrefixingActive { get; set; } = true;
|
491 | 491 |
|
| 492 | + private bool optionInlineNamespacesEvaluationActive = true; |
| 493 | + |
| 494 | + /// <summary> |
| 495 | + /// if <c>true</c> allow the use of inline namespace (Can be slow, and is less secure). |
| 496 | + /// if <c>false</c> unactive inline namespace (only namespaces in Namespaces list are available). |
| 497 | + /// By default : true |
| 498 | + /// </summary> |
| 499 | + public bool OptionInlineNamespacesEvaluationActive |
| 500 | + { |
| 501 | + get { return optionInlineNamespacesEvaluationActive; } |
| 502 | + set |
| 503 | + { |
| 504 | + optionInlineNamespacesEvaluationActive = value; |
| 505 | + instanceCreationWithNewKeywordRegex = new Regex(InstanceCreationWithNewKeywordRegexPattern, (optionCaseSensitiveEvaluationActive ? RegexOptions.None : RegexOptions.IgnoreCase)); |
| 506 | + castRegex = new Regex(CastRegexPattern, (optionCaseSensitiveEvaluationActive ? RegexOptions.None : RegexOptions.IgnoreCase)); |
| 507 | + } |
| 508 | + } |
| 509 | + |
492 | 510 | private Func<ExpressionEvaluator, List<string>, object> newMethodMem;
|
493 | 511 |
|
494 | 512 | /// <summary>
|
@@ -521,22 +539,6 @@ public bool OptionNewFunctionEvaluationActive
|
521 | 539 | /// </summary>
|
522 | 540 | public bool OptionNewKeywordEvaluationActive { get; set; } = true;
|
523 | 541 |
|
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 |
| - |
540 | 542 | /// <summary>
|
541 | 543 | /// if <c>true</c> allow to call static methods on classes.
|
542 | 544 | /// if <c>false</c> unactive this functionality.
|
@@ -714,7 +716,7 @@ public ExpressionEvaluator(Dictionary<string, object> variables) : this()
|
714 | 716 | #region Main evaluate methods (Expressions and scripts ==> public)
|
715 | 717 |
|
716 | 718 | private bool inScript = false;
|
717 |
| - private bool optionInlineNamespacesEvaluationActive = true; |
| 719 | + |
718 | 720 |
|
719 | 721 | /// <summary>
|
720 | 722 | /// Evaluate a script (multiple expressions separated by semicolon)
|
|
0 commit comments