/// <summary> /// Compares two exceptional periods for equality. /// </summary> /// <param name="ExceptionalPeriod1">An exceptional period.</param> /// <param name="ExceptionalPeriod2">Another exceptional period.</param> /// <returns>True if both match; False otherwise.</returns> public static Boolean operator ==(ExceptionalPeriod ExceptionalPeriod1, ExceptionalPeriod ExceptionalPeriod2) { // If both are null, or both are same instance, return true. if (Object.ReferenceEquals(ExceptionalPeriod1, ExceptionalPeriod2)) { return(true); } // If one is null, but not both, return false. if (((Object)ExceptionalPeriod1 == null) || ((Object)ExceptionalPeriod2 == null)) { return(false); } return(ExceptionalPeriod1.Equals(ExceptionalPeriod2)); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ExceptionalPeriod1">An exceptional period for opening or access hours.</param> /// <param name="ExceptionalPeriod2">Another exceptional period for opening or access hours.</param> /// <returns>true|false</returns> public static Boolean operator >(ExceptionalPeriod ExceptionalPeriod1, ExceptionalPeriod ExceptionalPeriod2) => ExceptionalPeriod1.CompareTo(ExceptionalPeriod2) > 0;
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ExceptionalPeriod1">An exceptional period for opening or access hours.</param> /// <param name="ExceptionalPeriod2">Another exceptional period for opening or access hours.</param> /// <returns>true|false</returns> public static Boolean operator ==(ExceptionalPeriod ExceptionalPeriod1, ExceptionalPeriod ExceptionalPeriod2) => ExceptionalPeriod1.Equals(ExceptionalPeriod2);