예제 #1
0
 public bool Equals(Power other) =>
 Watts.Equals(other.Watts);
예제 #2
0
        /// <summary>
        /// Returns true if StreamSet instances are equal
        /// </summary>
        /// <param name="other">Instance of StreamSet to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StreamSet other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Time == other.Time ||
                     Time != null &&
                     Time.Equals(other.Time)
                     ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     Latlng == other.Latlng ||
                     Latlng != null &&
                     Latlng.Equals(other.Latlng)
                 ) &&
                 (
                     Altitude == other.Altitude ||
                     Altitude != null &&
                     Altitude.Equals(other.Altitude)
                 ) &&
                 (
                     VelocitySmooth == other.VelocitySmooth ||
                     VelocitySmooth != null &&
                     VelocitySmooth.Equals(other.VelocitySmooth)
                 ) &&
                 (
                     Heartrate == other.Heartrate ||
                     Heartrate != null &&
                     Heartrate.Equals(other.Heartrate)
                 ) &&
                 (
                     Cadence == other.Cadence ||
                     Cadence != null &&
                     Cadence.Equals(other.Cadence)
                 ) &&
                 (
                     Watts == other.Watts ||
                     Watts != null &&
                     Watts.Equals(other.Watts)
                 ) &&
                 (
                     Temp == other.Temp ||
                     Temp != null &&
                     Temp.Equals(other.Temp)
                 ) &&
                 (
                     Moving == other.Moving ||
                     Moving != null &&
                     Moving.Equals(other.Moving)
                 ) &&
                 (
                     GradeSmooth == other.GradeSmooth ||
                     GradeSmooth != null &&
                     GradeSmooth.Equals(other.GradeSmooth)
                 ));
        }