Ejemplo n.º 1
0
        /// <summary>
        /// Validates the bindings.
        /// </summary>
        /// <returns></returns>
        public ValidationResult ValidateBindings()
        {
            var result = new ValidationResult();

            foreach(var info in GetBindings())
            {
                var validatedProperty = Type.ValidateAgainst(item, info.Property, info.Binding);
                result.Add(validatedProperty);
            }

            return result;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Validates the bindings.
        /// </summary>
        /// <returns></returns>
        public ValidationResult ValidateBindings()
        {
            var result = new ValidationResult();

            foreach(var info in GetBindings())
            {
                var validatedProperty = _element.Type.ValidateAgainst(_element, info.Property, info.Binding);
                result.Add(validatedProperty);
            }

            var triggerValidator = new TriggerValidator(_element.Type, _element, _element.Style.Triggers);
            result.Add(triggerValidator.ValidateBindings());

            return result;
        }
Ejemplo n.º 3
0
		public void SetUp()
		{
			validationResult = Validator.For<PersonView, PersonViewModel>().Validate();
		}
Ejemplo n.º 4
0
 /// <summary>
 /// Adds the specified validation result.
 /// </summary>
 /// <param name="validationResult">The validation result.</param>
 public void Add(ValidationResult validationResult)
 {
     _validatedProperties.AddRange(validationResult._validatedProperties);
     _errors.AddRange(validationResult._errors);
 }