/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (IdStr != null) { hashCode = hashCode * 59 + IdStr.GetHashCode(); } if (ExternalId != null) { hashCode = hashCode * 59 + ExternalId.GetHashCode(); } if (Error != null) { hashCode = hashCode * 59 + Error.GetHashCode(); } if (Status != null) { hashCode = hashCode * 59 + Status.GetHashCode(); } if (ActivityId != null) { hashCode = hashCode * 59 + ActivityId.GetHashCode(); } return(hashCode); } }
public override bool Equals(object obj) { var other = obj as Status; if (other == null) { return(false); } return(IdStr.Equals(other.IdStr) && User.IdStr.Equals(other.User.IdStr)); }
internal static List <int> ParseLogIdString(string LogIdsStr) { List <int> Ids = new List <int>(); foreach (string IdStr in LogIdsStr.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)) { try { Ids.Add(Int32.Parse(IdStr.Trim())); } catch { } } return(Ids); }
/// <summary> /// Returns true if Upload instances are equal /// </summary> /// <param name="other">Instance of Upload to be compared</param> /// <returns>Boolean</returns> public bool Equals(Upload other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( IdStr == other.IdStr || IdStr != null && IdStr.Equals(other.IdStr) ) && ( ExternalId == other.ExternalId || ExternalId != null && ExternalId.Equals(other.ExternalId) ) && ( Error == other.Error || Error != null && Error.Equals(other.Error) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( ActivityId == other.ActivityId || ActivityId != null && ActivityId.Equals(other.ActivityId) )); }
public override int GetHashCode() { return(IdStr.GetHashCode() ^ User.IdStr.GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Athlete != null) { hashCode = hashCode * 59 + Athlete.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Distance != null) { hashCode = hashCode * 59 + Distance.GetHashCode(); } if (ElevationGain != null) { hashCode = hashCode * 59 + ElevationGain.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (IdStr != null) { hashCode = hashCode * 59 + IdStr.GetHashCode(); } if (Map != null) { hashCode = hashCode * 59 + Map.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (_Private != null) { hashCode = hashCode * 59 + _Private.GetHashCode(); } if (Starred != null) { hashCode = hashCode * 59 + Starred.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (SubType != null) { hashCode = hashCode * 59 + SubType.GetHashCode(); } if (CreatedAt != null) { hashCode = hashCode * 59 + CreatedAt.GetHashCode(); } if (UpdatedAt != null) { hashCode = hashCode * 59 + UpdatedAt.GetHashCode(); } if (EstimatedMovingTime != null) { hashCode = hashCode * 59 + EstimatedMovingTime.GetHashCode(); } if (Segments != null) { hashCode = hashCode * 59 + Segments.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Route instances are equal /// </summary> /// <param name="other">Instance of Route to be compared</param> /// <returns>Boolean</returns> public bool Equals(Route other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Athlete == other.Athlete || Athlete != null && Athlete.Equals(other.Athlete) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Distance == other.Distance || Distance != null && Distance.Equals(other.Distance) ) && ( ElevationGain == other.ElevationGain || ElevationGain != null && ElevationGain.Equals(other.ElevationGain) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( IdStr == other.IdStr || IdStr != null && IdStr.Equals(other.IdStr) ) && ( Map == other.Map || Map != null && Map.Equals(other.Map) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( _Private == other._Private || _Private != null && _Private.Equals(other._Private) ) && ( Starred == other.Starred || Starred != null && Starred.Equals(other.Starred) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( SubType == other.SubType || SubType != null && SubType.Equals(other.SubType) ) && ( CreatedAt == other.CreatedAt || CreatedAt != null && CreatedAt.Equals(other.CreatedAt) ) && ( UpdatedAt == other.UpdatedAt || UpdatedAt != null && UpdatedAt.Equals(other.UpdatedAt) ) && ( EstimatedMovingTime == other.EstimatedMovingTime || EstimatedMovingTime != null && EstimatedMovingTime.Equals(other.EstimatedMovingTime) ) && ( Segments == other.Segments || Segments != null && Segments.SequenceEqual(other.Segments) )); }