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

            return
                (Equals((PriceBase)other) &&
                 (Time == other.Time || Time != null && Time.Equals(other.Time)) &&
                 (PreClosing == other.PreClosing || PreClosing != null && PreClosing.Equals(other.PreClosing)) &&
                 Pinned == other.Pinned);
        }
Ejemplo n.º 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)
                 ));
        }