Esempio n. 1
0
        /// <summary>
        /// Determines whether the first Guid value is greater than the second one.
        /// </summary>
        /// <param name="v1">The first value to compare.</param>
        /// <param name="v2">The second value to compare.</param>
        /// <param name="orEqual">If true, then the operator is less or equal to.</param>
        public static bool IsGreater(Guid v1, Guid v2, bool orEqual = false)
        {
            if (orEqual)
            {
                return(IsEqual(v1, v2) || IsGreater(v1, v2));
            }

            return(Comparers.GuidGreaterThan(v1, v2));
        }
Esempio n. 2
0
        /// <summary>
        /// Determines whether the first Guid value is greater than the second one.
        /// </summary>
        /// <param name="v1">The first value to compare.</param>
        /// <param name="v2">The second value to compare.</param>
        /// <param name="orEqual">If true, then the operator is less or equal to.</param>
        public static bool IsGreater(Guid v1, Nullable <Guid> v2, bool orEqual = false)
        {
            if (orEqual)
            {
                return(IsEqual(v1, v2) || IsGreater(v1, v2));
            }

            if (v2 == null)
            {
                return(true);
            }

            return(Comparers.GuidGreaterThan(v1, (Guid)v2));
        }