protected SelpValidator(SelpValidator parentValidator) : this() { ParentValidator = parentValidator; }
public void AddNestedValidator(SelpValidator validator) { if (status != ValidatorStatus.Created) { throw new WorkflowException( $"Validator {EntityName} has already been executed. There is no sense to add a nested validator."); } if (validator == null) { return; } validator.ParentValidator = this; NestedValidators.Add(validator); }
private List<string> InitParentEntitiesList(SelpValidator parentValidator) { if (parentValidator == null) { return new List<string>(); } List<string> result = InitParentEntitiesList(parentValidator.ParentValidator); result.Add(parentValidator.EntityName); return result; }