using System; using System.Threading; using System.Threading.Tasks; using Flowsharp.Models; using Flowsharp.Results; namespace Flowsharp.Handlers { public interface IActivityHandler { /// /// The type of activity handled by this handler. /// Type ActivityType { get; } /// /// Returns a value of whether the specified activity can execute. /// Task CanExecuteAsync(IActivity activity, WorkflowExecutionContext workflowContext, CancellationToken cancellationToken); /// /// Executes the specified activity. /// Task ExecuteAsync(IActivity activity, WorkflowExecutionContext workflowContext, CancellationToken cancellationToken); /// /// Resumes the specified activity. /// Task ResumeAsync(IActivity activity, WorkflowExecutionContext workflowContext, CancellationToken cancellationToken); } }