Class FormulaEngine
Provides functionality for evaluating C# code dynamically and managing the formula engine's lifecycle.
public static class FormulaEngine
- Inheritance
-
FormulaEngine
Remarks
The FormulaEngine class allows for the evaluation of C# code snippets in an isolated scripting context using the Roslyn scripting API. It also provides a method to initialize the engine, which can be used to preload necessary libraries for improved performance during runtime.
Properties
- EvaluateOverride
An optional override for the evaluation method. This can be set to provide a custom implementation.
Methods
- EvaluateAsync(object?, string, object?, object?, Type?, CancellationToken)
Evaluates the specified C# code asynchronously and returns the result. If EvaluateOverride is set, it will be used instead of the default implementation.
- Init()
Initializes formula engine. Do not need to call it directly. It can be called from the application startup in order to preload formula engine libraries.