Esempio n. 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingSchedule1">An id tag info.</param>
        /// <param name="ChargingSchedule2">Another id tag info.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ChargingSchedule ChargingSchedule1, ChargingSchedule ChargingSchedule2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(ChargingSchedule1, ChargingSchedule2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if ((ChargingSchedule1 is null) || (ChargingSchedule2 is null))
            {
                return(false);
            }

            return(ChargingSchedule1.Equals(ChargingSchedule2));
        }
Esempio n. 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingSchedule1">An id tag info.</param>
        /// <param name="ChargingSchedule2">Another id tag info.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ChargingSchedule ChargingSchedule1, ChargingSchedule ChargingSchedule2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(ChargingSchedule1, ChargingSchedule2))
            {
                return(true);
            }

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

            if ((Object)ChargingSchedule1 == null)
            {
                throw new ArgumentNullException(nameof(ChargingSchedule1), "The given id tag info must not be null!");
            }

            return(ChargingSchedule1.Equals(ChargingSchedule2));
        }