Example #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ParkingSpaceId1">A parking space identification.</param>
        /// <param name="ParkingSpaceId2">Another parking space identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(ParkingSpace_Id ParkingSpaceId1, ParkingSpace_Id ParkingSpaceId2)
        {
            if ((Object)ParkingSpaceId1 == null)
            {
                throw new ArgumentNullException(nameof(ParkingSpaceId1), "The given ParkingSpaceId1 must not be null!");
            }

            return(ParkingSpaceId1.CompareTo(ParkingSpaceId2) > 0);
        }
Example #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ParkingSpaceId1">A parking space identification.</param>
        /// <param name="ParkingSpaceId2">Another parking space identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ParkingSpace_Id ParkingSpaceId1, ParkingSpace_Id ParkingSpaceId2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(ParkingSpaceId1, ParkingSpaceId2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)ParkingSpaceId1 == null) || ((Object)ParkingSpaceId2 == null))
            {
                return(false);
            }

            return(ParkingSpaceId1.Equals(ParkingSpaceId2));
        }