* Initial version of BulkDispatchWorkflow * Update comments * Refactor options models for running workflows and add Properties * Fix resumption * Add ability to provide arguments when evaluating expressions * Update args syntax for JS * Fix ProtoActor Runtime Properties mapping * Use default constructor * Provide completed workflow instance ID as input to BulkDispatchWorkflows * Implement ChildFaulted port * Switch to Publish to make Memory service bus work * Update input evaluation and activity output retrieval Refined the input evaluation process to only consider inputs with AutoEvaluate set to true. Added a comment to clarify the purpose of the GetActivitiesWithOutputs method. Removed the unnecessary check for AutoEvaluate from the EvaluateInputPropertyAsync method.
32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using Elsa.Expressions.Models;
|
|
using JetBrains.Annotations;
|
|
using Microsoft.CodeAnalysis.Scripting;
|
|
|
|
namespace Elsa.CSharp.Contracts;
|
|
|
|
/// <summary>
|
|
/// Evaluates C# expressions.
|
|
/// </summary>
|
|
[PublicAPI]
|
|
public interface ICSharpEvaluator
|
|
{
|
|
/// <summary>
|
|
/// Evaluates a C# expression.
|
|
/// </summary>
|
|
/// <param name="expression">The expression to evaluate.</param>
|
|
/// <param name="returnType">The type of the return value.</param>
|
|
/// <param name="context">The context in which the expression is evaluated.</param>
|
|
/// <param name="options">A set of options.</param>
|
|
/// <param name="configureScriptOptions">An optional callback to configure the script options.</param>
|
|
/// <param name="configureScript">An optional callback to configure the script.</param>
|
|
/// <param name="cancellationToken">An optional cancellation token.</param>
|
|
/// <returns>The result of the evaluation.</returns>
|
|
Task<object?> EvaluateAsync(
|
|
string expression,
|
|
Type returnType,
|
|
ExpressionExecutionContext context,
|
|
ExpressionEvaluatorOptions options,
|
|
Func<ScriptOptions, ScriptOptions>? configureScriptOptions = default,
|
|
Func<Script<object>, Script<object>>? configureScript = default,
|
|
CancellationToken cancellationToken = default);
|
|
} |