using System.Text;
using Elsa.Expressions.Helpers;
using Elsa.Expressions.Models;
using Elsa.Mediator.Contracts;
using Elsa.Python.Contracts;
using Elsa.Python.Models;
using Elsa.Python.Notifications;
using Python.Runtime;
namespace Elsa.Python.Services;
///
/// Evaluates Python expressions using IronPython.
///
public class PythonNetPythonEvaluator : IPythonEvaluator
{
private const string ReturnVarName = "elsa_python_result_variable_name";
private readonly INotificationSender _notificationSender;
///
/// Initializes a new instance of the class.
///
public PythonNetPythonEvaluator(INotificationSender notificationSender)
{
_notificationSender = notificationSender;
}
///
public async Task