Class ExpressionEnvironment
- Namespace
- Acuit.Pinpoint.Workflows.Expressions
- Assembly
- Acuit.Pinpoint.Workflows.dll
The default implementation for IExpressionEnvironment.
public sealed class ExpressionEnvironment : IExpressionEnvironment
- Inheritance
-
ExpressionEnvironment
- Implements
- Inherited Members
Constructors
ExpressionEnvironment(IOptions<ExpressionEnvironmentOptions>)
Initializes a new instance of the ExpressionEnvironment class.
public ExpressionEnvironment(IOptions<ExpressionEnvironmentOptions> options)
Parameters
optionsIOptions<ExpressionEnvironmentOptions>Options for this expression environment.
Exceptions
- ArgumentNullException
optionsis null.
Methods
CreateCSharpScriptRunner<TValue>(string)
Creates a script runner for a C# expression.
public ScriptRunner<TValue> CreateCSharpScriptRunner<TValue>(string code)
Parameters
codestringThe C# expression.
Returns
- ScriptRunner<TValue>
The script runner, which is a delegate that will run the compiled code when invoked.
Type Parameters
TValueThe C# expression return type.
Remarks
C# expressions with the same code and return type are cached and reused.
Exceptions
- ArgumentNullException
codeis null.- Exception
There was an error compiling
code. Specific exceptions are not documented.