public void SetNextStep(ICheckStep step) { if (_nextStep != null) { _nextStep.OnNeedCheck -= AskForCheck; } _nextStep = step; _nextStep.OnNeedCheck += AskForCheck; }
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; }