Beispiel #1
0
        public override PropertyConstraintViolationError Validate(object value, PropertyDefinition propertyDefinition, IPropertyBag propertyBag)
        {
            Uri uri = value as Uri;

            if (uri != null && !this.IsUriOfExpectedKind(uri))
            {
                return(new PropertyConstraintViolationError(DataStrings.ConstraintViolationInvalidUriKind(uri, this.expectedUriKind), propertyDefinition, value, this));
            }
            return(null);
        }