using MW.WorkFlow; using System; using System.Threading.Tasks; namespace MainShell.Process { public class DieTransferActivity : ActivityAbstractBase { private readonly DieTransferMotionService _motionService; public DieTransferActivity(string name, DieTransferMotionService motionService) : base(name) { _motionService = motionService ?? throw new ArgumentNullException(nameof(motionService)); } protected override async Task OnExecuteAsync(WorkflowContext context, ActivityControl activityControl) { await _motionService.ExecuteAsync(context, activityControl).ConfigureAwait(false); return ActivityResult.Success; } } }