Beispiel #1
0
        /// <summary>
        ///     Returns true if WeeklyPrice instances are equal
        /// </summary>
        /// <param name="other">Instance of WeeklyPrice to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(WeeklyPrice other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                     ) &&
                 (
                     Rehabilitation == other.Rehabilitation ||
                     Rehabilitation != null &&
                     Rehabilitation.Equals(other.Rehabilitation)
                 ) &&
                 (
                     TurnoverRate == other.TurnoverRate ||
                     TurnoverRate != null &&
                     TurnoverRate.Equals(other.TurnoverRate)
                 ));
        }
Beispiel #2
0
        /// <summary>
        ///     Returns true if DailyPrice instances are equal
        /// </summary>
        /// <param name="other">Instance of DailyPrice to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DailyPrice other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                (Equals((PriceBase)other) &&
                 (
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                 ) &&
                 (
                     PreClosing == other.PreClosing ||
                     PreClosing != null &&
                     PreClosing.Equals(other.PreClosing)
                 ) &&
                 (
                     Rehabilitation == other.Rehabilitation ||
                     Rehabilitation != null &&
                     Rehabilitation.Equals(other.Rehabilitation)
                 ) &&
                 (
                     TurnoverRate == other.TurnoverRate ||
                     TurnoverRate != null &&
                     TurnoverRate.Equals(other.TurnoverRate)
                 ) &&
                 (
                     Per == other.Per ||
                     Per != null &&
                     Per.Equals(other.Per)
                 ) &&
                 (
                     Psr == other.Psr ||
                     Psr != null &&
                     Psr.Equals(other.Psr)
                 ) &&
                 (
                     Pcfr == other.Pcfr ||
                     Pcfr != null &&
                     Pcfr.Equals(other.Pcfr)
                 ) &&
                 (
                     Pbr == other.Pbr ||
                     Pbr != null &&
                     Pbr.Equals(other.Pbr)
                 ) &&
                 (
                     Stopped == other.Stopped ||
                     Stopped != null &&
                     Stopped.Equals(other.Stopped)
                 ) &&
                 (
                     SpecialTreatment == other.SpecialTreatment ||
                     SpecialTreatment != null &&
                     SpecialTreatment.Equals(other.SpecialTreatment)
                 ));
        }