コード例 #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEStatusChange1">A EVSEStatusChange.</param>
        /// <param name="EVSEStatusChange2">Another EVSEStatusChange.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(EVSEStatusChange EVSEStatusChange1, EVSEStatusChange EVSEStatusChange2)
        {
            if ((Object)EVSEStatusChange1 == null)
            {
                throw new ArgumentNullException("The given EVSEStatusChange1 must not be null!");
            }

            return(EVSEStatusChange1.CompareTo(EVSEStatusChange2) > 0);
        }
コード例 #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEStatusChange1">A EVSEStatusChange.</param>
        /// <param name="EVSEStatusChange2">Another EVSEStatusChange.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(EVSEStatusChange EVSEStatusChange1, EVSEStatusChange EVSEStatusChange2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(EVSEStatusChange1, EVSEStatusChange2))
            {
                return(true);
            }

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

            return(EVSEStatusChange1.Equals(EVSEStatusChange2));
        }