Ejemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="OperatorEVSEData1">An operator EVSE data.</param>
        /// <param name="OperatorEVSEData2">Another operator EVSE data.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(OperatorEVSEData OperatorEVSEData1, OperatorEVSEData OperatorEVSEData2)
        {
            if ((Object)OperatorEVSEData1 == null)
            {
                throw new ArgumentNullException(nameof(OperatorEVSEData1), "The given OperatorEVSEData1 must not be null!");
            }

            return(OperatorEVSEData1.CompareTo(OperatorEVSEData2) > 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares two results for equality.
        /// </summary>
        /// <param name="OperatorEVSEData1">An operator EVSE data.</param>
        /// <param name="OperatorEVSEData2">Another operator EVSE data.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public static Boolean operator ==(OperatorEVSEData OperatorEVSEData1, OperatorEVSEData OperatorEVSEData2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(OperatorEVSEData1, OperatorEVSEData2))
            {
                return(true);
            }

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

            return(OperatorEVSEData1.Equals(OperatorEVSEData2));
        }