WorkFlow
作者:互联网
NextStep = 1;
while(ManualEventSet.WaitOne())
{
Process();
Thread.Sleep(20);
}
void Process()
{
switch(nextStep)
{
case 1:
DoSomething;
break; // 会一直执行这个Step
// 正常流程的下一步
nextStep = 2;
// 失败了可以跳到统一的错误处理
break;
case 2:
nextStep = 3;
break;
case 3:
break;
case 4:
break;
}
}
标签:case,DoSomething,WorkFlow,Process,break,nextStep,错误处理 来源: https://www.cnblogs.com/LiuwayLi/p/15665365.html