/// <summary> /// Determines whether the first Guid value is smaller 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 IsLess(Guid v1, Guid v2, bool orEqual = false) { if (orEqual) { return(IsEqual(v1, v2) || IsLess(v1, v2)); } return(Comparers.GuidLessThan(v1, v2)); }
/// <summary> /// Determines whether the first Guid value is smaller 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 IsLess(Guid v1, Nullable <Guid> v2, bool orEqual = false) { if (orEqual) { return(IsEqual(v1, v2) || IsLess(v1, v2)); } if (v2 == null) { return(false); } return(Comparers.GuidLessThan(v1, (Guid)v2)); }
/// <summary> /// Determines whether the first Guid value is smaller 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 IsLess(Nullable <Guid> v1, Guid v2, bool orEqual = false) { if (orEqual) { return(IsEqual(v1, v2) || IsLess(v1, v2)); } if (v1 == null) { return(true); } return(Comparers.GuidLessThan((Guid)v1, v2)); }