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

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

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

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

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

            return(ChargingProfile1.Equals(ChargingProfile2));
        }