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

            return(MeterReport1.CompareTo(MeterReport2) > 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares two meter reportes for equality.
        /// </summary>
        /// <param name="MeterReport1">An meter report.</param>
        /// <param name="MeterReport2">Another meter report.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public static Boolean operator ==(MeterReport MeterReport1, MeterReport MeterReport2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(MeterReport1, MeterReport2))
            {
                return(true);
            }

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

            return(MeterReport1.Equals(MeterReport2));
        }