예제 #1
0
        /// <summary>
        /// Compare with just the start being inclusive
        /// </summary>
        protected override IpValidationResult CompareStartInclusive()
        {
            var retVal = new IpValidationResult();

            if (Value >= RangeStart && Value < RangeEnd)
            {
                return(retVal);
            }

            retVal.IsValid           = false;
            retVal.ValidationMessage = "The compared value is not in the range inclusive of the start";

            return(retVal);
        }
예제 #2
0
        /// <summary>
        /// Comapre with neither start nor end values included
        /// </summary>
        protected override IpValidationResult CompareAllExclusive()
        {
            var retVal = new IpValidationResult();

            if (Value > RangeStart && Value < RangeEnd)
            {
                return(retVal);
            }

            retVal.IsValid           = false;
            retVal.ValidationMessage = "The compared value is not in the range excluding the start and end";

            return(retVal);
        }