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

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

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

            return(EVSEGroup1.Equals(EVSEGroup2));
        }