public override string ToString() { var sb = new StringBuilder(); sb.Append("Name: "); sb.Append(Name); sb.Append(" ("); sb.Append(Symbol); sb.AppendLine(")"); sb.Append("Market Cap: "); sb.AppendLine(MarketCap.ToString()); sb.AppendLine("Weight: "); sb.Append(Weight.ToString()); return sb.ToString(); }
public bool Equals(Asset other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && Slug == other.Slug && Supply.Equals(other.Supply) && MarketCap.Equals(other.MarketCap) && Price.Equals(other.Price) && Volume.Equals(other.Volume) && Change.Equals(other.Change) && Change1Hour.Equals(other.Change1Hour) && Change1Week.Equals(other.Change1Week) && AllTimeHigh.Equals(other.AllTimeHigh) && AllTimeLow.Equals(other.AllTimeLow) && EarliestKnownPrice.Equals(other.EarliestKnownPrice) && EarliestTradeDate.Equals(other.EarliestTradeDate) && Equals(Logo, other.Logo)); }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Slug != null ? Slug.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Supply.GetHashCode(); hashCode = (hashCode * 397) ^ MarketCap.GetHashCode(); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ Volume.GetHashCode(); hashCode = (hashCode * 397) ^ Change.GetHashCode(); hashCode = (hashCode * 397) ^ Change1Hour.GetHashCode(); hashCode = (hashCode * 397) ^ Change1Week.GetHashCode(); hashCode = (hashCode * 397) ^ AllTimeHigh.GetHashCode(); hashCode = (hashCode * 397) ^ AllTimeLow.GetHashCode(); hashCode = (hashCode * 397) ^ EarliestKnownPrice.GetHashCode(); hashCode = (hashCode * 397) ^ EarliestTradeDate.GetHashCode(); hashCode = (hashCode * 397) ^ (Logo != null ? Logo.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { return(Id * CryptoId * Name.GetHashCode() * Symbol.GetHashCode() * Price.GetHashCode() * PercentChange1H.GetHashCode() * PercentChange24H.GetHashCode() * MarketCap.GetHashCode() * LastUpdated.GetHashCode()); }