예제 #1
0
 public void SetNextStep(ICheckStep step)
 {
     if (_nextStep != null)
     {
         _nextStep.OnNeedCheck -= AskForCheck;
     }
     _nextStep              = step;
     _nextStep.OnNeedCheck += AskForCheck;
 }
예제 #2
0
 public BaseCheck(ExclusionType exclusionType = ExclusionType.Undefined, List <ICheckStep> checkSteps = null)
 {
     if (checkSteps != null)
     {
         ICheckStep lastStep = null;
         foreach (var step in checkSteps)
         {
             if (lastStep != null)
             {
                 lastStep.SetNextStep(step);
             }
             else
             {
                 CheckChain = step;
                 lastStep   = CheckChain;
                 continue;
             }
             lastStep = step;
         }
     }
     ExclusionType = exclusionType;
 }