elsa-core/src/clients/Elsa.Api.Client/Expressions/CSharpExpression.cs
Sipke Schoorstra f8e0f20296
Add Python Expression support (#4600)
* Scaffold Python project

* Add Workflow Variable accessor

* Add RunPython activity

* Add option to register scripts via options
2023-11-04 18:15:56 +01:00

37 lines
899 B
C#

using System.Text.Json.Serialization;
using Elsa.Api.Client.Contracts;
namespace Elsa.Api.Client.Expressions;
/// <summary>
/// Represents a C# expression.
/// </summary>
public class CSharpExpression : IExpression
{
/// <summary>
/// Initializes a new instance of the <see cref="CSharpExpression"/> class.
/// </summary>
[JsonConstructor]
public CSharpExpression()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="CSharpExpression"/> class.
/// </summary>
/// <param name="value">The C# expression.</param>
public CSharpExpression(string value)
{
Value = value;
}
/// <summary>
/// Gets or sets the C# expression.
/// </summary>
public string? Value { get; set; }
/// <summary>
/// Returns the C# expression.
/// </summary>
public override string ToString() => Value ?? "";
}