using System;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Elsa.Attributes;
using Elsa.Expressions;
using Elsa.Results;
using Elsa.Services;
using Elsa.Services.Models;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Activities.Reflection.Activities
{
///
/// Execute a method by reflection.
///
[ActivityDefinition(
Category = "Reflection",
Description = "Execute a method by reflection.",
RuntimeDescription = "a => !!a.state.variableName ? `Execute a Method by reflection and store the result into ${ a.state.variableName }.` : 'Execute a Method by reflection.'",
Outcomes = new[] { OutcomeNames.Done }
)]
public class ExecuteMethod : Activity
{
[ActivityProperty(Hint = "An expression that returns an array of arguments to the method. Leave empty if the method does not accept any arguments.")]
public WorkflowExpression