예제 #1
0
 protected SelpValidator(SelpValidator parentValidator)
     : this()
 {
     ParentValidator = parentValidator;
 }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }