diff --git a/Version.props b/Version.props index db7f1ca..72ecf0e 100644 --- a/Version.props +++ b/Version.props @@ -10,10 +10,10 @@ 1 1 1 - 1385 - 1.1.1 - 1.1.1+1385.220515020318.release.39f4e48 - 39f4e48 - release + 1394 + 1.1.1-dev.1394.221214120330 + 1.1.1-dev.1394.221214120330+72.dynamic-expresso-options.9c849a7-dirty + 9c849a7-dirty + dynamic-expresso-options \ No newline at end of file diff --git a/changelog.md b/changelog.md index 480a2a3..d897017 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.2.0] - 2022-12-14 ## + +### Added ### +DmnExecutionContextOptions now supports external configurations to initialize dynamic expresso interpreter options. + ## [1.1.1] - 2022-05-15 ## ### Fixed ### diff --git a/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContext.cs b/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContext.cs index a451885..06662d7 100644 --- a/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContext.cs +++ b/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContext.cs @@ -233,7 +233,7 @@ public virtual object EvalExpression(string expression, Type outputType, string throw Logger.Fatal($"{nameof(expression)} is null or empty"); if (outputType == null) throw Logger.Fatal($"{nameof(outputType)} is null"); - var interpreter = new Interpreter(); + var interpreter = new Interpreter(Options.InterpreterOptions); ConfigureInterpreter(interpreter); var parameters = new List(); diff --git a/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContextOptions.cs b/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContextOptions.cs index 873c9df..5e75e08 100644 --- a/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContextOptions.cs +++ b/net.adamec.lib.common.dmn.engine/engine/execution/context/DmnExecutionContextOptions.cs @@ -1,4 +1,6 @@ -namespace net.adamec.lib.common.dmn.engine.engine.execution.context +using DynamicExpresso; + +namespace net.adamec.lib.common.dmn.engine.engine.execution.context { /// /// Execution configuration options @@ -25,5 +27,10 @@ public class DmnExecutionContextOptions : IDmnExecutionContextOptions /// Scope of the parsed expression cache (Cache parsed expressions for definition cross contexts by default) /// public ParsedExpressionCacheScopeEnum ParsedExpressionCacheScope { get; set; } = ParsedExpressionCacheScopeEnum.Definition; + + /// + /// Scope of the dynamic expresso interpreter (InterpreterOptions.Default option by default) + /// + public InterpreterOptions InterpreterOptions { get; set; } = InterpreterOptions.Default; } } \ No newline at end of file diff --git a/net.adamec.lib.common.dmn.engine/engine/execution/context/IDmnExecutionContextOptions.cs b/net.adamec.lib.common.dmn.engine/engine/execution/context/IDmnExecutionContextOptions.cs index c52868b..4f3689f 100644 --- a/net.adamec.lib.common.dmn.engine/engine/execution/context/IDmnExecutionContextOptions.cs +++ b/net.adamec.lib.common.dmn.engine/engine/execution/context/IDmnExecutionContextOptions.cs @@ -1,4 +1,6 @@ -namespace net.adamec.lib.common.dmn.engine.engine.execution.context +using DynamicExpresso; + +namespace net.adamec.lib.common.dmn.engine.engine.execution.context { /// /// Execution configuration options @@ -24,5 +26,9 @@ public interface IDmnExecutionContextOptions /// Scope of the parsed expression cache (Cache parsed expressions for definition cross contexts by default) /// ParsedExpressionCacheScopeEnum ParsedExpressionCacheScope { get; } + /// + /// Scope of the dynamic expresso interpreter (InterpreterOptions.Default option by default) + /// + InterpreterOptions InterpreterOptions { get; } } } \ No newline at end of file