Пример #1
0
        public CompareToPropertyValueAttribute(PropertyValidationComparisonUtil.ComparisonType comparisonType, string propertyName)
        {
            _propertyName   = propertyName;
            _comparisonType = comparisonType;

            if (propertyName == null)
            {
                throw new ArgumentNullException(nameof(propertyName));
            }
        }
        public SkipValidationIfPropertyAttribute(string propertyName, PropertyValidationComparisonUtil.ComparisonType comparisonType, object targetValue)
        {
            _propertyName   = propertyName;
            _comparisonType = comparisonType;
            _targetValue    = targetValue;

            if (propertyName == null)
            {
                throw new ArgumentNullException(nameof(propertyName));
            }
        }