添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using MainShell.Common;
|
||||
using MainShell.ProcessResult;
|
||||
using MW.WorkFlow;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MainShell.Process
|
||||
{
|
||||
public class DieRecheckActivity : ActivityAbstractBase
|
||||
{
|
||||
private readonly DieRecheckService _dieRecheckService;
|
||||
|
||||
public DieRecheckActivity(string name, DieRecheckService dieRecheckService)
|
||||
: base(name)
|
||||
{
|
||||
_dieRecheckService = dieRecheckService ?? throw new ArgumentNullException(nameof(dieRecheckService));
|
||||
}
|
||||
|
||||
protected override async Task<ActivityResult> OnExecuteAsync(WorkflowContext context, ActivityControl activityControl)
|
||||
{
|
||||
await _dieRecheckService.ExecuteAsync(context, activityControl).ConfigureAwait(false);
|
||||
|
||||
DieRecheckProcessResult result = context.GetData<DieRecheckProcessResult>(WorkflowContextKeys.DieRecheckResult);
|
||||
if (result == null || !result.IsSuccess)
|
||||
{
|
||||
return ActivityResult.Failure;
|
||||
}
|
||||
|
||||
return ActivityResult.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user