Exemplo n.º 1
0
        protected virtual IValidationResult ValidateImpl <T>(IValidationTarget <T> target)
        {
            if (target.Value == null)
            {
                return(target.GetResult());
            }

            if (validated.Contains(target.Value))
            {
                return(target.GetResult());
            }

            validated.Add(target.Value);

            var model = modelBuilder.GetModel <T>();

            model.Validate(this, target);

            return(target.GetResult());
        }