24 lines
745 B
C#
24 lines
745 B
C#
|
|
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<ActivityResult> OnExecuteAsync(WorkflowContext context, ActivityControl activityControl)
|
||
|
|
{
|
||
|
|
await _motionService.ExecuteAsync(context, activityControl).ConfigureAwait(false);
|
||
|
|
|
||
|
|
return ActivityResult.Success;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|